新安装完CentOS Linux
setsebool 提示selinux is disabled,说明selinux 没有被启用:
[root@hadoop ~]#vi /etc/selinux/config
找到SELINUX 行修改成为:SELINUX=enforcing:
# 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 - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
再用该命令即可。