gitlab安装centos7

安装gitlab前放开http和ssh访问

firewall-cmd --permanent --add-service=http

service firewalld restart


增加gitlab包服务器,安装gitlab

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum -y install gitlab-ce


编译和启动gitlab

gitlab-ctl reconfigure

如果修改gitlab的配置文件,也需要reconfigure


修改gitlab配置文件/etc/gitlab/gitlab.rb修改部分:

。。。

external_url 'http://123.60.185.114:8088'

。。。

(指定gitlab服务器ip或者域名+端口号(这里指定访问gitlab端口号,默认8080,很有可能报错,最好改成其他))

修改成external_url 'http://gitlab.mopgaming.com:80'直接以80端口,域名访问,前提没有进程占用80端口。


修改配置文件后重启gitlab

gitlab-ctl reconfigure


浏览器访问gitlab

http://123.60.185.114:8088

起始帐号密码:

Username: root 
Password: 5iveL!fe

登录后修改新密码。


gitlab安装自带redis和nginx


参考文档:

如何在 CentOS 上安装 Gitlab

http://icyleaf.com/2013/09/how-to-install-gitlab-on-centos/

GitLab 安装配置笔记

http://segmentfault.com/a/1190000002722631

gitlab官方文档

https://about.gitlab.com/downloads/#centos7



你可能感兴趣的:(linux,git,gitlab,版本库)