查看SELinux狀態:
1、/usr/sbin/sestatus ##如果SELinux status參數爲enabled即爲開啓狀態
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
2、getenforce ##也可以用這個命令檢查
Permissive
關閉SELinux:
1、臨時關閉(不重啓服務器):
setenforce 0 ##設置SELinux 成爲permissive模式
##setenforce 1 設置SELinux 成爲enforcing模式
2、修改配置文件需要重啓服務器:
vim /etc/selinux/config
將SELINUX=enforcing改爲SELINUX=disabled
重啓機器即可