CentOS 7 安裝GitLab
GitLab是一個(gè)利用Ruby on Rails開(kāi)發(fā)的開(kāi)源應(yīng)用程序,實(shí)現(xiàn)一個(gè)自托管的Git項(xiàng)目倉(cāng)庫(kù),可通過(guò)Web界面進(jìn)行訪問(wèn)公開(kāi)的或者私人項(xiàng)目.
Gitlab中文網(wǎng):https://www.gitlab.com.cn/
Gitlab官網(wǎng):https://about.gitlab.com/
Gitlab官方文檔:https://docs.gitlab.com/ce/README.html
- CentOS7配置SSH
- CentOS7配置SMTP
安裝Gitlab
- 安裝配置依賴項(xiàng)
使用Postfix來(lái)發(fā)送郵件,在安裝期間請(qǐng)選擇'Internet Site'. 您也可以用sendmai或者 配置SMTP服務(wù) 并 使用SMTP發(fā)送郵件.在 Centos 6 和 7 系統(tǒng)上, 下面的命令將在系統(tǒng)防火墻里面開(kāi)放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
- 添加GitLab倉(cāng)庫(kù),并安裝到服務(wù)器上
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
# 手動(dòng)下載rpm包安裝
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
rpm -i gitlab-ce-XXX.rpm
- 啟動(dòng)GitLab
sudo gitlab-ctl reconfigure
- 使用瀏覽器訪問(wèn)GitLab
首次訪問(wèn)GitLab,系統(tǒng)會(huì)讓你重新設(shè)置管理員的密碼,設(shè)置成功后會(huì)返回登錄界面.默認(rèn)的管理員賬號(hào)是root,如果你想更改默認(rèn)管理員賬號(hào),請(qǐng)輸入上面設(shè)置的新密碼登錄系統(tǒng)后修改帳號(hào)名.