以Httpd为例:
1.可能没有安装Apache组件
[root@mycentos shell]# yum install httpd
2.安装成功后,可能没有启动服务,检测有无httpd进程
[root@mycentos shell]# ps -e |grep httpd
3.如没有,启用该服务
[root@mycentos shell]# systemctl restart httpd.service
以下是重点:
当以上几点都没有什么问题时,那么就一定是liunx的防火防火墙没有关闭!
关闭并禁用防火墙:
[root@mycentos shell]# systemctl stop firewalld.service #停止防火墙服务
[root@mycentos shell]# systemctl status firewalld.service #查看防火墙的状态
[root@mycentos Desktop]# systemctl disable firewalld.service #禁用防火墙开机启动服务