阿裏雲ESC 部署 GitLab-ce 並配置使用外部 nginx
最近試著在阿裏雲的 ESC 上部署了一下 GitLab 的社區版本,並且使用了非內嵌的 nginx 服務,遇到不少坑,特意記錄一下。
首先是安裝 GitLab 社區版,具體安裝的流程按照官網的說明來進行。GitLab 官方提供了 Omnibus包安裝、社區提供的安裝方法、和官方的其他安裝方法。這裏推薦使用 Omnibus 包來安裝,這也是官方推薦的方式。用這個包安裝部署gitlab,便於後期的配置修改和更新。Omnibus 包安係統版本分為不同的包,我的係統是 Centos7的,所以采用對應7的安裝包。步驟如下:
GitLab 服務安裝部署完成,接下來是配置該服務使用外部的 nginx 來訪問。
一 官方Centos7的安裝說明地址
https://www.gitlab.com.cn/installation/
1.安裝相關依賴,打開係統防火牆的 HTTP 和 SSH的訪問。
sudo yum install curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
2.添加GitLab 鏡像源並安裝
curl -sS https://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | sudo bash sudo yum install gitlab-ce
3.配置並啟動服務
4.通過訪問上麵配置的域名來重新設置管理員密碼。sudo gitlab-ctl reconfigure
最後更新:2017-09-14 19:32:57