- 安装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
该博客详细介绍了如何在Linux系统中安装并配置SSH服务以实现远程连接,设置防火墙以允许HTTP访问,并启用Postfix服务以发送邮件通知。步骤包括使用yum安装相关软件,启动和设置开机启动服务,以及调整防火墙规则。此外,还涵盖了GitLab服务的启停和重启操作。
1437

被折叠的 条评论
为什么被折叠?



