[原]关闭selinux

检查selinux状态

1 [root@controller0 ~]# getenforce
2 enforcing                                #disabled表示关闭状态   enforcing表示开启状

临时关闭selinux(不用重启机器,临时生效)

setenforce 0         ##设置selinux为permissive模式   临时生效
setenforce 1         ##设置SELinux为enforcing模式

永久关闭selinux

修改/etc/selinux/config 文件

将SELINUX=enforcing改为SELINUX=disabled

重启机器,完成

原文地址:https://www.cnblogs.com/horizonli/p/5541734.html