Linux下GitLab服务器搭建

系统环境

操作系统: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

常用命令:

更新配置:[root@gitlabserver ~]# gitlab-ctl reconfigure

启动:[root@gitlabserver ~]# gitlab-ctl start

停止:[root@gitlabserver ~]# gitlab-ctl stop

重启:[root@gitlabserver ~]# 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

原文地址:https://www.cnblogs.com/mcgrady/p/7516338.html