當前位置:妙知谷 >

遊戲數碼 >互聯網 >

CentOS7關閉防火牆和SELinux

CentOS7關閉防火牆和SELinux

本文主要講述瞭如何在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命令

  • 文章版權屬於文章作者所有,轉載請註明 https://miaozhigu.com/zh-hant/sm/hulianwang/go287y.html