查看selinux的状态

sh-4.1# getenforce
Disabled
sh-4.1# getenforce
Disabled
1 永久方法 – 需要重启服务器
修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器。
2 临时方法 – 设置系统参数
使用命令setenforce 0
附:
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为模式
•enforcing:强制模式,代表 SELinux 运作中,且已经正确的开始限制 domain/type 了; 
•permissive:宽容模式:代表 SELinux 运作中,不过仅会有警告讯息并不会实际限制 domain/type 的存取。这种模式可以运来作为 SELinux 的 debug 之用; •disabled:关闭,SELinux 并没有实际运作。
原文地址:https://www.cnblogs.com/bass6/p/5738745.html