当前位置:首页 > 服务器技术 > apache

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

sudo systemctl disable firewalld.service

但还是不行,有点沮丧。

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

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

 

 

临时关闭
 
[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   

本文系统来源:https://www.cnblogs.com/April-cloud/p/12237031.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!