Centos7關閉防火牆時遇到的錯誤Failed to start firewalld.service: Unit not found. Unit firewalld.service could no


Centos7關閉防火牆

執行命令

systemctl status firewalld.service


時報錯Unit firewalld.service could not be found.
然后查了很多資料都說執行下面這個就解決了

systemctl unmask firewalld.service

然而又報錯了
Failed to start firewalld.service: Unit not found.



最后終於找到問題

其實就是要排除你們是否安裝了這個firewalld

yum install firewalld
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld

依次執行以上命令后發現終於ok了

其他命令

systemctl start firewalld.service //開啟防火牆
systemctl stop firewalld.service //關閉防火牆
systemctl enable firewalld.service //設置開機自動啟動
systemctl disable firewalld.service //設置關閉開機制動啟動
firewall-cmd --reload //在不改變狀態的條件下重新加載防火牆


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM