selinux是个麻烦的东西,一般非专业运维会选择关闭selinux,关闭方法如下
vim /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 - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
reboot
重启后输入sestatus可以看到selinux状态,如果显示SELinux status: disabled就表示已经关闭了
关闭CentOS7 selinux
发表评论