SELinux是什么?SELinux是指安全增强型Linux(Security-Enhanced Linux),是Linux的一个安全子系统。SELinux的存在可能导致一些安装出现失败和错误,所以在不需要的情况下,建议关闭SELinux。接下来,将为大家分享CentOS 7关闭SELinux的教程步骤:
1、运行命令:[root@hadoop101 ~]# vim /etc/selinux/config 修改配置文件/etc/selinux/config
2、将SELINUX=enforcing 改为SELINUX=disabled
# 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
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
3、同步/etc/selinux/config配置文件
[root@hadoop101 ~]# xsync /etc/selinux/config
4、最后,重启服务器即可
[root@hadoop101 ~]# reboot
[root@hadoop102 ~]# reboot
[root@hadoop103 ~]# reboot
相关教程推荐: