首页 > 技术文章 > [原]关闭selinux

horizonli 2016-05-30 11:06 原文

检查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

重启机器,完成

推荐阅读