Ubuntu GitLab网络配置步骤如下:
curl、openssh-server等。sudo apt update
sudo apt install -y curl openssh-server ca-certificates postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt install gitlab-ce
/etc/gitlab/gitlab.rb,设置external_url为服务器IP或域名。sudo nano /etc/gitlab/gitlab.rb
# 修改以下行(示例为IP,可替换为域名)
external_url 'http://192.168.1.100'
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
sudo ufw allow http
sudo ufw allow https
sudo ufw enable
可选配置:
/etc/gitlab/gitlab.rb中启用Let’s Encrypt证书。参考来源: