CentOS7關閉防火牆和SELinux
來源:酷知科普網 3.17W
本文主要講述瞭如何在CentOS7上臨時關閉防火牆、永久關閉防火牆、臨時關閉SELinux和永久關閉SELinux的方法。
出自openstackblog。
防火牆(firewalld)
(01)臨時關閉防火牆systemctl stop firewalld
(02)永久防火牆開機自啟動systemctl disable firewalld
(03)臨時開啟防火牆systemctl start firewalld
(04)防火牆開機啟動systemctl enable firewalld
(05)檢視防火牆狀態systemctl status firewalld
SELinux
(01)臨時關閉SELinuxsetenforce 0
(02)臨時開啟SELinuxsetenforce 1
(03)開機關閉SELinux編輯/etc/selinux/config檔案,將SELINUX的值設定為disabled,如下圖。下次開機SELinux就不會啟動了。
(04)檢視SELinux狀態執行getenforce命令