博客介绍内容

Subscribe RSS FeedSubscribe Comments

CentOS如何关闭SELINUX

一、临时关闭SELINUX

setenforce 0

备注:

setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式

二、永久关闭SELINUX

修改/etc/selinux/config

内容如下:

# 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 - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

把上面的SELINUX=enforcing改为disabled,注意不要改到下面这个,否则会导致CENTOS重启失败,重复报错“unable to load selinux policy”

三、如何出现上述错误

重启CENTOS在启动菜单上e,然后在倒数第二行的lang=。。。后面增加一个“ selinux=0”,然后按下CTRL+X重启即可进入系统。

相关文章: 打印文章

相关评论:  

发表评论:

订阅博客

最新文章

Copyright information
MyBlog 1.8