小米關(guān)閉selinux 如何關(guān)閉Linux里邊的selinux?
如何關(guān)閉Linux里邊的selinux?1、檢查SELinux status命令:1、/usr/SBIN/sestatus-V#;如果SELinux status參數(shù)已啟用,則它處于打開狀態(tài)。SELi
如何關(guān)閉Linux里邊的selinux?
1、檢查SELinux status命令:1、/usr/SBIN/sestatus-V#;如果SELinux status參數(shù)已啟用,則它處于打開狀態(tài)。SELinux狀態(tài):enabled 2,getenforce#;您也可以使用此命令檢查。2關(guān)閉SELinux方法:1。臨時關(guān)閉(不重新啟動機器):setenforce 0#set SELinux to permission mode#setenforce 1 set SELinux更改配置文件以重新啟動機器:修改/etc/SELinux/config文件,將SELinux=enabling更改為SELinux=disabled,重新啟動機器
linux怎么看selinux狀態(tài)?
以下是關(guān)閉SELinux
系統(tǒng)版本的方法:CentOS 6.5 Mini
1。查看SELinux狀態(tài)
查看SELinux的詳細狀態(tài),如果啟用,則表示打開
;/usr/SBIN/sestatus-v][查看SELinux的模式
#getenforce
2。關(guān)閉SELinux
2.1:永久關(guān)閉(需要在重新啟動服務(wù)器后生效)
#sed-I“s/SELinux=enforcing/SELinux=disabled/”/etc/SELinux/config
2.2:臨時關(guān)閉(立即生效,但在重新啟動服務(wù)器后無效)
#setenforce 0#將SELinux設(shè)置為權(quán)限模式(即關(guān)機)#設(shè)置強制1#將SELinux設(shè)置為啟用模式
]這樣,SELinux將被關(guān)閉。當安裝軟件遇到問題時,可以考慮在安裝前關(guān)閉SELinux
1永久方法-重新啟動服務(wù)器,在/etc/SELinux/config文件中修改SELinux=disabled,然后重新啟動服務(wù)器。2臨時方法-使用命令setenforce0設(shè)置系統(tǒng)參數(shù)。附件:setenforce1將SELinux設(shè)置為強制模式,setenforce0將SELinux設(shè)置為權(quán)限模式。希望采用
SELinux是一個Linux安全增強工具。關(guān)閉setenforce0或修改文件VIM/etc/sysconfig/SELinux,將SELinux=enforced更改為SELinux=已禁用.linux防火墻使用chkconfig iptables on啟動服務(wù)iptables start打開防火墻規(guī)則。