参考:
https://www.cnblogs.com/weifeng1463/p/7714492.html
1,更新yum源
vi /etc/yum.repos.d/gitlab-ce.repo
添加以下内容:
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
2,更新本地yum缓存
yum makecache
3,安装gitLab社区版
yum install gitlab-ce
4,更改默认监听端口号:
vi /etc/gitlab/gitlab.rb
修改如下行:
#nginx['listen_port'] = nil
改为
nginx['listen_port'] = 8080
5,重启
gitlab-ctl reconfigure
gitlab-ctl restart
6,其它常用命令
sudo gitlab-ctl start # 启动所有 gitlab 组件;
sudo gitlab-ctl stop # 停止所有 gitlab 组件;
sudo gitlab-ctl restart # 重启所有 gitlab 组件;
sudo gitlab-ctl status # 查看服务状态;
sudo gitlab-ctl reconfigure # 启动服务;
sudo vim /etc/gitlab/gitlab.rb # 修改默认的配置文件;
gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;
sudo gitlab-ctl tail # 查看日志;