CentOS 7 安裝GitLab

CentOS 7 安裝GitLab


CentOS 7 安裝GitLab

GitLab是一個利用Ruby on Rails開發的開源應用程序,實現一個自託管的Git項目倉庫,可經過Web界面進行訪問公開的或者私人項目. 
Gitlab中文網:https://www.gitlab.com.cn/ 
Gitlab官網:https://about.gitlab.com/ 
Gitlab官方文檔:https://docs.gitlab.com/ce/README.html

CentOS7配置SSH
http://blog.csdn.net/wh211212/article/details/52932776

CentOS7配置SMTP
 http://blog.csdn.net/wh211212/article/details/53040620

安裝Gitlab

參考連接:https://www.gitlab.com.cn/downloads/#centos7

安裝配置依賴項
 使用Postfix來發送郵件,在安裝期間請選擇’Internet Site’. 您也能夠用sendmai或者 配置SMTP服務 並 使用SMTP發送郵件.在 Centos 67 系統上, 下面的命令將在系統防火牆裏面開放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倉庫,並安裝到服務器上
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
# 手動下載rpm包安裝
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
rpm -i gitlab-ce-XXX.rpm

啓動GitLab
sudo gitlab-ctl reconfigure

使用瀏覽器訪問GitLab
首次訪問GitLab,系統會讓你從新設置管理員的密碼,設置成功後會返回登陸界面.默認的管理員帳號是root,若是你想更改默認管理員帳號,請輸入上面設置的新密碼登陸系統後修改賬號名.
相關文章
相關標籤/搜索