创建清华源
vim /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
|
安装
yum makecache && yum install -y gitlab-ce
修改访问地址
vim /etc/gitlab/gitlab.rb

重新编译
gitlab-ctl reconfigure

获取root账户密码
more /etc/gitlab/initial_root_password

修改默认密码

防火墙
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| # 防火墙中打开gitlab访问端口 firewall-cmd --zone=public --add-port=8001/tcp --permanent
–zone:作用域 –add-port=8001/tcp:添加端口,格式为:端口/通讯协议 –permanent:永久生效,没有此参数重启后失效
# 重启防火墙 firewall-cmd --reload # 查看已经开放的端口 firewall-cmd --list-ports
# 停止防火墙 systemctl stop firewalld.service # 启动防火墙 systemctl start firewalld.service # 禁止防火墙开机启动 systemctl disable firewalld.service
|
导入项目
