修改配置文件,永久关闭selinux。
vim /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=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
setenforce 0 #临时关闭selinux命令
getenforce #查看selinux当前状态
本文转自 jin626889 51CTO博客,原文链接:http://blog.51cto.com/zuoshou/1956878,如需转载请自行联系原作者