临时和永久关闭Selinux
和firewalld相比selinux 操作的粒度更小
防火墙是操作的ip 允许/禁止访问
selinux 操作的是进程
允许http进程读写文件(禁止后root也无权限操作)
临时关闭
[root@xuegod63 ~]# getenforce
Enforcing
[root@xuegod63 ~]# setenforce 0 #临时关闭
setenforce: SELinux is disabled
永久关闭
[root@xuegod63 ~]# vim /etc/selinux/config
改:7 SELINUX=enforcing #前面的 7,表示文档中第 7 行。方便你查找
为:7 SELINUX=disabled
[root@xuegod63 ~]# reboot #必须重启系统,才可以真正的关闭 selinux