1. 安装相关依赖
yum install curl policycoreutils openssh-server openssh-clients -y
# 确保sshd启动(正常情况下, sshd是启动的)
systemctl enable sshd
systemctl start sshd
  1. 配置firewalld
firewall-cmd --permanent --add-service=http
systemctl reload firewalld
  1. 引入yum源, 并安装gitlab
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce -y
# 配置并启动
gitlab-ctl reconfigure

如果当前服务器的80和8080端口均未被占用, 则直接可以通过服务器的ip或域名访问到后台

12-21 01:45