- 安装ssh
sudo yum install -y curl policycoreutils-pythonopenssh-server
- 设置ssh开机自启动
sudo systemctl enable sshd
- 启动ssh服务
sudo systemctl start sshd
- 安装防火墙(如果已安装则跳过)
yum install firewalld systemd -y
- 开启防火墙
service firewalld start
- 添加http服务到firewalld
sudo firewall-cmd --permanent --add-service=http
- 重启防火墙
sudo systemctl reload firewalld
- 安装Postfix以发送通知邮件
sudo yum install postfix
- 将postfix服务设置成开机自启动
sudo systemctl enable postfix
- 启动postfix
sudo systemctl start postfix
- 启动gitlab服务
sudo gitlab-ctl start
- 停止gitlab服务
sudo gitlab-ctl stop
- 重启gitlab服务
sudo gitlab-ctl restart
- 重启失败时可以先使用如下命令
sudo systemctl start gitlab-runsvdir