Ubuntu Gitlab安装

Gitlab官网:https://docs.gitlab.com/ee/update/index.html#upgrade-paths
下面gitlab-ce_15.4.0-ce.0_amd64.deb为要下载的gitlab版本,安装的时候可以下载指定版本,比如把15.4.0改成你要下载的版本号,版本号可在gitlab官网可查看

sudo apt update

sudo apt upgrade

sudo apt install build-essential curl file git ca-certificates openssh-server

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_15.4.0-ce.0_amd64.deb/download.deb

dpkg -i gitlab-ce_15.4.0-ce.0_amd64.deb

gitlab-ctl reconfigure

gitlab-ctl start

gitlab-ctl status

修改配置:
sudo vim /etc/gitlab/gitlab.rb

external_url 'https://www.xxx.com' #这个url是访问gitlab的url,同时也对应下面Clone项目的地址
nginx['redirect_http_to_https']=true #开启https

b5cb33e8723b4e8eacc3ef3dfbb33b49.png

个人网站:https://www.leachchen.com/

你可能感兴趣的:(Ubuntu Gitlab安装)