kubekey/docs/turn-off-SELinux.md
Lien c5d5f6660c use the correct apostrophe
Signed-off-by: lilien1010 <liling@apache.org>
2020-08-17 19:50:02 +08:00

662 B

How to turn off SELinux

turn off SELinux

# Edit the configuration
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
#restart the system  
reboot
# check SELinux
getenforce

Edit the configuration file /etc/selinux/config, change SELINUX= to SELINUX=disabled, then restart the system, SELinux will be disabled

Temporarily shut down SELinux

# Temporarily closing SELinux is to switch between enforcing and permissive modes
setenforce 0 #Switch to tolerance mode
setenforce 1 #Switch to mandatory mode
# check SELinux
getenforce

Temporary shutdown enforcing, invalid after restarting the system