机器配置要求较高,至少需要2G内存
1. 配置程序包管理系统(yum)
1 | vi /etc/yum.repos.d/gitlab-ce.repo |
- 将以下内容复制到文件中
1
2
3
4
5[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
2. 更新本地缓存
1 | yum makecache |
3. 安装gitlab
1 | yum install -y gitlab-ce |
4. 修改拉代码的地址换成自己的ip和端口
1 | vi /etc/gitlab/gitlab.rb |
更改以下配置
1 | external_url 'http://ip:port' |
5. 刷新配置
1 | gitlab-ctl reconfigure |
6. 基本命令
1 | gitlab-ctl start |