Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

在红帽企业版Linux 4上怎样关掉SELinux?

已更新 -

红帽全球支持服务(Red Hat Global Support Services)建议,只有当你确认以后不需要再运行SELinux的时候,才可以关掉SELinux。在关闭SELinux的情况下创建的文件,当启用SELinux时,这些文件将没有必要的运行信息。如果你想阻止SELinux启用他的策略,但是仍保持SELinux运行,请查看文章:"How do I enable enforcing or permissive mode for SELinux"。

使用system-config-securitylevel工具打开或者关掉SELinux。选择SELinux标签查看Enabled选项。更改之后必须重启系统使之生效。

例如:

4844-System-config-securitylevel.png

也可以通过编辑/etc/selinux/config文件,设置SELINUX的值:SELINUX=Disabled并启动系统,以禁用SELinux。

可以在kernel启动选项中加入 selinux=0,禁用SELinux。

GRUB样例如下:

title Red Hat Enterprise Linux ES (2.6.9-5.EL)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-5.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet selinux=0
        initrd /initrd-2.6.9-5.EL.img

Comments