關閉→
當前位置:趣知常識網>遊戲數碼>互聯網>CentOS7關閉防火牆和SELinux

CentOS7關閉防火牆和SELinux

趣知常識網 人氣:3W

本文主要講述瞭如何在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就不會啟動了。

CentOS7關閉防火牆和SELinux

(04)查看SELinux狀態執行getenforce命令

TAG標籤:#CentOS7 #SELinux #防火牆 #關閉 #