2018-11-02 11:23:09   Visit  1691

在/etc/yum.repos.d 目录下创建文件gitlab-ce.repo,使用国内的安装源

baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1

清理yum缓存

yum makecache

安装

yum install gitlab-ce

gitlab-ce 在centos中的目录

配置目录在这里
/etc/gitlab
主目录在这里
/opt/gitlab
运行目录在这里

gitlab-ctl reconfigure 后生成的新的配置文件都在这里

/var/opt/gitlab

启动

gitlab-ctl start

修改配置

配置文件是 /etc/gitlab 下的gitlab.rb

修改域名

external_url \\\'https://gitlab.leechg.com\\\'

配置nignx端口

gitlab内置NGINX,修改其配置也要在gitlab.rb文件中进行

nginx[\\\'listen_port\\\'] = 8100

gitlab服务端口修改

# unicorn[\\\'backlog_socket\\\'] = 1024

修改完配置后一定要运行 gitlab-ctl reconfigure 才能生效

gitlab-ctl reconfigure 
©2017 Leechg.com