一:環境安裝
[root@localhost ~]# yum install curl openssh-server openssh-clients postfix cronie
[root@localhost ~]# service postfix start
[root@localhost ~]# chkconfig postfix on
[root@localhost ~]# lokkit -s http -s ssh
二:安裝gitlab
[root@localhost ~]# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
[root@localhost ~]# yum install gitlab-ce
因為gitlab yum安裝從國外源安裝,非常慢,所有可以翻墻通過以下地址下載rpm包,然后上傳到服務器
[root@localhost ~]# rpm -ivh gitlab-ce-XXX.rpm
三:配置及啟動
[root@localhost ~]# gitlab-ctl reconfigure
啟動配置完成后即可通過瀏覽器訪問gitlab
四:環境說明
gitlab啟動停止:
[root@localhost ~]# gitlab-ctl start
[root@localhost ~]# gitlab-ctl stop
gitlab啟動后會開啟3個端口:80、8080、8060
如果訪問網頁顯示502,則是8080端口沒有啟動,查看是否有8080端口被占用,或修改gitlab端口,配置文件為/etc/gitlab/ gitlab.rb
如果端口啟動,偶爾出現502則查看內存是否足夠