Disable selinux and selinux
1. View The SELinux status:Getenforce
Enforcing)
Disable)
1. Disable SELinux (it will still take effect after restart)
Modify vi/etc/sysconfig/selinux
[Root @ developer ~] # Vi/etc/selinux/config
# 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-Targeted processes are protected,
# Mls-Multi Level Security protection.
SELINUXTYPE = targeted
Change the value of The SELINUX item to disable and enable the SELinux service.
Change to SELINUX = disable to disable SeLinux
Change to SELINUX = enforcing and use SeLinux
Or
Vi/etc/selinux/conf
Set SELINUX = disabled
2. Do not restart to make it take effect
/Usr/sbin/setenforce 0 Immediately disable SELINUX
/Usr/sbin/setenforce 1 enable SELINUX immediately
3. Add it to the default startup of the system.
Echo "/usr/sbin/setenforce 0">/etc/rc. local
Echo "/usr/sbin/setenforce 0">/etc/rc. local