CentOS关闭Selinux
时间:2015-06-04 09:02 来源:linux.it.net.cn 作者:IT
[root@moban ~]#cat /etc/selinux/config #此为Selinux的配置文件目录
# This filecontrols the state of SELinux on the system.
# SELINUX= cantake one of these three values:
# enforcing - SELinux security policy isenforced.
# permissive - SELinux prints warningsinstead of enforcing.
# disabled - No SELinux policy
is
loaded.
SELINUX=enforcing
# SELINUXTYPE=can take one of these two values:
# targeted - Targeted processes areprotected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
enforcing:开启Selinux
permissive:自由模式,此种模式下,只会打印警告消息,但不会阻止
disabled:关闭Selinux
[root@moban ~]# vi /etc/selinux/config
[root@moban ~]#sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/selinux/conf
[root@moban ~]#grep
"disabled"
/etc/selinux/config
# disabled - No SELinux policy
is
loaded.
SELINUX=disabled
[root@moban ~]#getenforce
Enforcing
[root@moban ~]# setenforce
0
[root@moban ~]#getenforce
Permissive
[root@moban ~]#setenforce
1
[root@moban ~]#getenforce
Enforcing
[root@moban ~]# setenforce2
usage: setenforce [ Enforcing | Permissive |
1
|
0
]
(责任编辑:IT)
|