SELinux is the NSA's implementation of mandatory access control, the most outstanding new security subsystem in Linux history. But it is because the function is too powerful, which causes many times to work inconvenient, so some cases need to turn off SELinux.
There are two important documents /etc/sysconfig/selinux and /etc/selinux/config under SELinux.
/etc/sysconfig/selinux is a soft connection to a /etc/selinux/config file
View the SELinux status command disabled to turn off Enbledw to turn on the following two command functions the same
[email protected] ~]# /usr/sbin/sestatus-v
SELinux status:disabled
[email protected] ~]# Getenforce
Disabled
Turn off SELinux
temporarily closed # #不用重启服务
Setenforce 0 # #临时关闭防火墙
Setenforce 1 # #临时开启防火墙
Permanent Open | off # #修改完需要重启服务生效
Vim/etc/selinux/config
selinux=disabled # #关闭
Selinux=enforcing# #开启
Turn SELinux on and off