selinux 关闭


查看selinux状态

[host]#sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted



1、永久关闭

[host]#vim /etc/selinux/config
修改
SELINUX=enforcing
为
SELINUX=disabled



重启



2、临时关闭

[host]#setenforce 0
[host]#sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted