在CentOS上部署GitLab的流程大致如下:
更新系統:
sudo yum update
安裝依賴:
sudo yum install -y curl policycoreutils openssh-server openssh-clients postfix
配置防火墻:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload
安裝GitLab:
添加GitLab的RPM鏡像源:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
安裝GitLab:
sudo yum install gitlab-ce
修改配置文件:
sudo vi /etc/gitlab/gitlab.rb
修改外部URL:
external_url 'http://your_server_ip'
重啟GitLab服務以應用配置:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
完成上述步驟后,可以通過服務器的IP地址和配置的端口訪問GitLab界面。
請注意,上述流程可能會根據GitLab版本和具體需求有所不同。建議參考GitLab的官方文檔以獲取最準確的安裝指南。