gitlab 安裝部署

1.安裝相關依賴
yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python

2.啓動postfix,並設置位開機啓動
systemctl restart postfix
systemctl enable postfix

3.防火牆設置
#此命令需在防火牆開啓後使用
firewall-cmd --add-service=http --permanent
firewall-cmd –reload

4.關閉防火牆
systemctl stop firewalld
setenforce 0

5.安裝gitlab
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.6.7-ce.0.el7.x86_64.rpm

6.安裝rpm包
rpm -ivh gitlab-ce-8.6.7-ce.0.el7.x86_64.rpm

7.修改配置文件gitlab.rb
Vim /etc/gitlab/gitlab.rb
查找到
external_url 這個屬性,將其改爲ip+地址(external_url 'http://localhost')

8.加載配置文件並啓動
gitlab-ctl reconfigure
gitlab-ctl restart

gitlab 安裝部署
全部成功即可


gitlab 安裝部署


9.首次登陸需要自己設置密碼
默認賬號爲 : root
設置密碼 :12345678

gitlab 安裝部署


注:gitlab在服務器中的默認代碼存放的位置是

/var/opt/gitlab/git-data/repositories

訪問IP頁面測試成功:
gitlab 安裝部署

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章