gitlab安裝

一:環境安裝

[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包,然后上傳到服務器

https://packages.gitlab.com/gitlab/gitlab-ce

[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則查看內存是否足夠

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容