官方文档:
- 修改端口
https://docs.gitlab.com/omnibus/settings/nginx.html#change-the-default-port-and-the-ssl-certificate-locations - 配置
https://docs.gitlab.com/omnibus/settings/configuration.html#change-the-default-port-and-the-ssl-certificate-locations - 官方安装地址:
https://about.gitlab.com/install/?version=ce#centos-8
sudo dnf install -y curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
# Check if opening the firewall is needed with: sudo systemctl status firewalld perl
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="https://gitlab.example.com" dnf install -y gitlab-ce
修改存储位置
修改前
vim /etc/gitlab/gitlab.rb
# git_data_dirs({
# "default" => {
# "path" => "/mnt/nfs-01/git-data"
# }
# })
修改后(取消注释,修改path)
vim /etc/gitlab/gitlab.rb
git_data_dirs({
"default" => {
"path" => "/snt/data/gitlab"
}
})
修改端口
vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.139.130:9999'
修改为本机IP+端口
- 加载配置,重启
gitlab-ctl reconfigure
gitlab-ctl restart
访问gitlab出现502,是正常的,因为加载配置需要几分钟。
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4wHqPdgz-1634692359505)(http://192.168.10.61:9001/server/…/Public/Uploads/2021-05-27/60af0ac8ab707.png)] - 过一会就会正常,提示你修改root密码
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-J1IywOCq-1634692359510)(http://192.168.10.61:9001/server/…/Public/Uploads/2021-05-27/60af0b8f18c2c.png)]
如果一直显示502
chmod -R 755 /var/log/gitlab
gitlab-ctl restart
参考命令:
检查
gitlab-rake gitlab:check SANITIZE=true --trace
参考文档:
注意应该是13.6(可能是13.3)之后unicorn就停用了,改用puma
如不确定可在/var/opt/gitlab/gitlab-rails/etc/查看如果是puma.rb就是停用了unicorn,如果是unicorn.rb就是unicorn。
https://about.gitlab.com/install/?version=ce
https://blog.youkuaiyun.com/haveqing/article/details/114256542
https://ld246.com/article/1592710224510
https://blog.youkuaiyun.com/qq_46291185/article/details/106037160