问题描述
gitlab版本:14.0.5
虚拟机版本:centos7
安装gitlab并启动后,访问,这个时候可以正常访问。但是当虚拟机关机后,再次访问(这个时候gitlab是启动的),访问就报502了。
原因分析
解决方法
目的:支持gitlab邮件发送
systemctl enable postfix && systemctl start postfix
查看是否安装openssh
rpm -qa|grep openssh
查看是否安装postfix
rpm -qa|grep postfix
将ssh服务设置开机启动
systemctl enable sshd
启动ssh服务
systemctl start sshd
查看ssh服务状态
systemctl status sshd
注:笔者的其他的服务都是启动着的,看到ssh这的时候,竟然可以正常访问了。但奇怪的是笔者的ssh也是启动着的,但重新执行一遍命令就可以。
添加http服务器到firewalld
[root@centos110 ~]# firewall-cmd --permanent --add-service=http
success
[root@centos130 ~]# firewall-cmd --permanent --add-service=ssh
[root@centos110 ~]# systemctl reload firewalld
[root@centos110 ~]#
如果关闭防火墙就不需要做以上配置
发表评论