修改/etc/sysconfig/selinux,将SELINUX设定为disable, 使用命令setenforce
0让selinux配置文件生效。
/etc/sysconfig/selinux配置文件
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#
#
#
SELINUX=enforcing
# enforcing 改为disabled
#
SELINUXTYPE= type of policy in use. Possible values are:
#
#
SELINUXTYPE=targeted
Linux核心参数(Kernel Parameter)
或者在/boot/grub/menu.lst中修改核心参数后加上: selinux=0 (停止) 或 selinux=1
(开启)
/boot/grub/menu.lst配置文件
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to
this file
# NOTICE:
#
#
#
#
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.9-78.EL)
检查SELinux当前况态
[root@info bash]# getenforce
Disabled
最后我发现修改了,并不能立即生效,我重启后才生效。