共計 625 個字符,預計需要花費 2 分鐘才能閱讀完成。
在 CentOS 上部署 GitLab 的步驟如下:
- 安裝依賴軟件包:
sudo yum install -y curl policycoreutils-python openssh-server cronie
- 安裝 Postfix 郵件服務器(用于發送郵件通知):
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
- 添加 GitLab 倉庫并安裝 GitLab:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install -y gitlab-ce
- 配置 GitLab:
sudo vi /etc/gitlab/gitlab.rb
根據需要修改 external_url
、gitlab_rails['gitlab_email_from']
等配置項,保存并關閉文件。
- 重新配置并啟動 GitLab:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
-
訪問 GitLab:
在瀏覽器中輸入http://your-server-ip
,即可訪問安裝好的 GitLab。 -
設置管理員密碼:
首次訪問 GitLab 時,會提示設置管理員密碼,按照提示設置即可。
至此,您已成功在 CentOS 上部署了 GitLab。
丸趣 TV 網 – 提供最優質的資源集合!
正文完