关闭centos中的SELinux
SELinux可以简单的理解为增加了安全性的linux系统,更多的理解,可以自行寻找答案,这里不再复述,下面是关闭SELinux的方法。首先,使用getendorce或者sestatus命令查看当前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=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
将其修改为:
# 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 these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
另外,还需查看启动菜单文件: /boot/grub/menu.lst中是否有selinux=0这个选项,如果存在,则必须要将其删除才可。
最后重新启动系统,就OK了。
页:
[1]