1.安裝和配置必要的依賴(lài)項(xiàng)
在CentOS 7上,以下命令還將在系統(tǒng)防火墻中打開(kāi)HTTP,HTTPS和SSH訪(fǎng)問(wèn)。
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
( 提示"FirewallD is not running",
systemctl status firewalld;
systemctl start firewalld;
)
安裝Postfix以發(fā)送通知電子郵件
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
2.添加GitLab軟件包存儲(chǔ)庫(kù)并安裝軟件包
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee
常用命令
查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
刷新配置
gitlab-ctl reconfigure
啟動(dòng)、關(guān)閉和重啟(/opt/gitlab/bin)
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart
提示“ok:run”成功。如下圖:
問(wèn)題:
運(yùn)行 gitlab-ctl reconfigure 命令時(shí)出現(xiàn)下面的?letsencrypt?證書(shū)錯(cuò)誤:
答:
在 /etc/gitlab/gitlab.rb 中添加 letsencrypt['enable'] = false 可解決。
gitlab http訪(fǎng)問(wèn)404錯(cuò)誤
答:
檢查Firewalls是否增加http服務(wù)是否安裝,嘗試關(guān)閉防火墻,/etc/gitlab/gitlab.rb 配置中注釋external_url