如何开启或关闭SELinux
2011-11-30 00:09
507 查看
CentOS的 /etc/sysconfig/selinux
修改档案/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=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
把 SELINUX设定为disable, 下次启动系统后将会停止SElinux。
Linux核心参数(Kernel Parameter)
或者可以在核心参数后加上: selinux=0 (停止) 或 selinux=1 (开启)参数
档案/boot/grub/menu.lst
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet selinux=0
initrd /initrd-2.6.18-1.2798.fc6.img
检查SELinux现时况态
要知到你现在是否使用 SELinux:
# getenforce
Enforcing
注:setenforce是切换SELinux的模式(Enforcing和Permissive,都是在开启状态),而不能设置SELinux是开启还是关闭。
修改档案/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=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
把 SELINUX设定为disable, 下次启动系统后将会停止SElinux。
Linux核心参数(Kernel Parameter)
或者可以在核心参数后加上: selinux=0 (停止) 或 selinux=1 (开启)参数
档案/boot/grub/menu.lst
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet selinux=0
initrd /initrd-2.6.18-1.2798.fc6.img
检查SELinux现时况态
要知到你现在是否使用 SELinux:
# getenforce
Enforcing
注:setenforce是切换SELinux的模式(Enforcing和Permissive,都是在开启状态),而不能设置SELinux是开启还是关闭。
相关文章推荐
- 如何开启或关闭SELinux
- 如何查看,关闭和开启selinux
- 如何开启或关闭SELinux
- selinux的开启与关闭
- centos:开启和关闭selinux
- 如何关闭selinux和防火墙
- SELinux开启与关闭
- Redhat Enterprise Linux中如何关闭SELinux?
- SELinux 的开启和关闭
- 关闭selinux和防火墙开启状态增加3306端口
- Centos Linux 系统下如何快速关闭SELINUX
- 如何编程实现开启或关闭GPS?
- linux 如何调用sqlplus关闭和开启数据库
- [FAQ10781]如何开启与关闭adb 的认证机制(google adb secure) (adb RSA 指纹认证)
- 如何--关闭/开启--Oracle 10g数据库
- Redhat Enterprise Linux中如何关闭SELinux?
- mysql如何开启关闭外部连接
- 在Linux系统中如何查看和关闭SELinux
- 如何在Mac OS X中开启或关闭显示隐藏文件命令
- SELinux 的开启和关闭