技(jì )術文(wén)檔 2020年12月26日
查看SELinux狀态:
1、/usr/sbin/sestatus -v ##如果SELinux status參數為(wèi)enabled即為(wèi)開啓狀态
SELinux status: enabled
2、getenforce ##也可(kě)以用(yòng)這個命令檢查 Enforcing是開啓,permissive是關閉了
關閉SELinux:
1、臨時關閉(不用(yòng)重啓機器):
setenforce 0 ##設置SELinux 成為(wèi)permissive模式
##setenforce 1 設置SELinux 成為(wèi)enforcing模式
2、修改配置文(wén)件需要重啓機器:
修改/etc/selinux/config 文(wén)件
将SELINUX=enforcing改為(wèi)SELINUX=disabled
重啓機器即可(kě)
關鍵詞: