如何关闭SELinux

修改/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 - SELinux is fully disabled.
> SELINUX=enforcing

SELINUXTYPE= type of policy in use. Possible values are:
targeted - Only targeted network daemons are protected.
strict - Full SELinux protection.
SELINUXTYPE=targeted

把 SELINUX设定为disable, 下次启动系统后将会停止SElinux。

检查SELinux现时况态,要知到你现在是否使用 SELinux:

getenforce
Enforcing