1. 程式人生 > >Linux下GitLab服務器搭建

Linux下GitLab服務器搭建

art 組件 blog tro www 占用 linux下 常用 關閉

系統環境

操作系統:CentOS6.9
關閉防火墻

安裝步驟

1. 安裝Postfix
2. 下載rpm包並安裝
3. 配置gitlab,vim /etc/gitlab/gitlab.rb,指定ip+端口號
4. 執行配置並啟動。
--gitlab-ctl reconfigure
--gitlab-ctl start
5. 通過web訪問,比如http://192.168.1.76:8089

常用命令:

更新配置:[[email protected] ~]# gitlab-ctl reconfigure

啟動:[[email protected] ~]# gitlab-ctl start

停止:[[email protected] ~]# gitlab-ctl stop

重啟:[[email protected] ~]# gitlab-ctl restart

註意事項

1,gitlab啟動後,訪問報502錯誤
一般是兩個原因造成的。
1)內存不足4GB
2)8080端口被占用,因為gitlab的組件unicorn的默認端口號是8080,所以需要改用其它端口,比如8089。

參考資料

1. 官網:https://about.gitlab.com/installation/
2. 中文:https://www.gitlab.com.cn/installation/#centos-6
3. http://www.cnblogs.com/wenwei-blog/p/5861450.html

4. http://yijiebuyi.com/blog/49aa7d3793aeafeb77da67a4159ec1aa.html

Linux下GitLab服務器搭建