您的位置:首页 > 运维架构 > Linux

centos selinux关闭

2011-09-07 17:57 267 查看
1. /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
可以将SELINUX设置为disabled,在下次启动主机时selinux将不再启动

2. setenforce

setenforce 0

用该命令可以立即关闭selinux

3. getenforce

用该命令可以查看selinux当前状态
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: