1.快速部署Gitlab
1.1 下载配置
1.1.1 下载Gitlab
#CentOS 7
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.9.8-ce.0.el7.x86_64.rpm
#Ubuntu
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/bionic/main/g/gitlab-ce/gitlab-ce_15.8.2-ce.0_amd64.deb
1.1.2 配置Gitlab
#配置Gitlab
vim /etc/gitlab/gitlab.rb
...
external_url 'http://192.168.1.1' #修改成IP地址或域名
...
1.1.3 加载配置
#加载配置
gitlab-ctl reconfigure
1.2 Gitlab-HTTPS
1.2.1 修改配置文件
#修改配置文件
vim /etc/gitlab/gitlab.rb
...
external_url 'https://gitlab.xxxxx.com' #修改成IP地址或域名
...46%
nginx['enable'] = true
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/xxxxx.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/xxxxx.com.key"
...
#修改ssh克隆配置(20%)
gitlab_rails['gitlab_shell_ssh_port'] = 22 #修改
1.2.2 加载配置
#加载配置
gitlab-ctl reconfigure
#重启Gitlab
gitlab-ctl restart
评论区