系统版本
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
安装包下载
https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
依赖下载
https://rpm.pbone.net/info_idpl_72389426_distro_centos7_com_policycoreutils-python-2.5-34.el7.x86_64.rpm.html
安装步骤
- 安装依赖
rpm -ivh --nodeps policycoreutils-python-2.5-34.el7.x86_64.rpm --force
- 安装 gitlab
rpm -ivh gitlab-ce-15.8.5-ce.0.el7.x86_64.rpm
- 修改端口
vim /etc/gitlab/gitlab.rb
external_url 'http://IP地址:8080'
nginx['listen_port']=8080
- 防火墙放行端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-port
- 使配置生效
gitlab-ctl reconfigure
gitlab-ctl restart
gitlab-ctl stop
- 查看 root 用户初始密码
less /etc/gitlab/initial_root_password