当前位置:Gxlcms > 数据库问题 > Linux学习--CentOS7 安装好MySQL及Apache后,宿主机无法打开网页

Linux学习--CentOS7 安装好MySQL及Apache后,宿主机无法打开网页

时间:2021-07-01 10:21:17 帮助过:13人阅读

sudo systemctl disable firewalld.service

但还是不行,有点沮丧。

最后想了想,把SElinux彻底关闭试试,终于可以访问了。所以先记录一下。

 技术图片

 

 

临时关闭
 
[root@localhost ~]# setenforce 0
永久关闭

可以修改配置文件/etc/selinux/config,将其中SELINUX设置为disabled

  [root@localhost ~]# cat /etc/selinux/config        # This file controls the state of SELinux on the system.   # SELINUX= can take one of these three values:   #     enforcing - SELinux security policy is enforced.   #     permissive - SELinux prints warnings instead of enforcing.   #     disabled - No SELinux policy is loaded.   #SELINUX=enforcing   SELINUX=disabled   # SELINUXTYPE= can take one of three two values:   #     targeted - Targeted processes are protected,   #     minimum - Modification of targeted policy. Only selected processes are protected.    #     mls - Multi Level Security protection.   SELINUXTYPE=targeted   [root@rdo ~]# sestatus   SELinux status:                 disabled   又想关闭SELinux这个操作是不是有点简单粗暴了,看了看关于SELinux的一些东西,小白还是不懂,还是决定先把环境弄好,先进行下一步测试,目标是学习SQL注入。    

Linux学习--CentOS7 安装好MySQL及Apache后,宿主机无法打开网页

标签:nta   ping   mct   inux   注入   一个   下一步   targe   mini   

人气教程排行