CentOS7.4搭建GitLab


1、查看服務器環境

uname -a

2、下載安裝包

【1】找到相應的最新版本的下載路徑

網址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/?C=M&O=D

 

 

我們得到下載路徑:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.4.6-ce.0.el7.x86_64.rpm

【2】准備文件夾

mkdir /home/soft/gitlab
cd /home/soft/gitlab
 
        

 

 【3】下載安裝包

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.4.6-ce.0.el7.x86_64.rpm

 

3、安裝GitLab

【1】安裝遇到報錯

 

發現報錯:

warning: gitlab-ce-11.4.6-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
error: Failed dependencies:
policycoreutils-python is needed by gitlab-ce-11.4.6-ce.0.el7.x86_64

 

 【2】檢查postfix

rpm -qa|grep postfix
ps -e|grep postfix

發現postfix有安裝包,如果沒有去安裝:

yum install postfix

這里有,但是沒有啟動,那我們就需要去啟動

systemctl enable postfix
systemctl start postfix

這里enable成功,但是start 報錯:

Job for postfix.service failed. See 'systemctl status postfix.service' and 'journalctl -xn' for deta

【3】解決postfix啟動報錯

 

vi /etc/postfix/main.cf


#取消這句的注釋
inet_interfaces = all
#這句all改為ipv4
inet_protocols = ipv4

 

【4】啟動postfix

#啟動
systemctl start postfix.service
#查看狀態
ps -ef | grep postfix
systemctl status postfix.service

【5】安裝policycoreutils-python

yum install -y policycoreutils-python

【6】再次安裝GitLab

rpm -i gitlab-ce-11.4.6-ce.0.el7.x86_64.rpm

 

 到這里,安裝就算完成了。

4、配置GitLab

 

vim /etc/gitlab/gitlab.rb

修改external_url

 

執行

gitlab-ctl reconfigure

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM