ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] > Centos7关闭防火墙时遇到的错误Failed to start firewalld.service: Unit not found. Unit firewalld.service could no ## Centos7关闭防火墙 在centos上想要关闭防火墙,查了一些博客,执行命令 ~~~powershell systemctl status firewalld.service ~~~ 时报错Unit firewalld.service could not be found. 然后查了很多资料都说执行下面这个就解决了 ~~~powershell systemctl unmask firewalld.service ~~~ 然而又报错了 Failed to start firewalld.service: Unit not found. 太头疼了,百度千篇一律的答案始终无法解决, 最后终于找到问题 其实就是要排除你们是否安装了这个firewalld ~~~powershell yum install firewalld systemctl unmask firewalld systemctl enable firewalld systemctl start firewalld ~~~ 依次执行以上命令后发现终于ok了 其他命令 ~~~powershell systemctl start firewalld.service //开启防火墙 systemctl stop firewalld.service //关闭防火墙 systemctl enable firewalld.service //设置开机自动启动 systemctl disable firewalld.service //设置关闭开机制动启动 firewall-cmd --reload //在不改变状态的条件下重新加载防火墙 ~~~ ## [防火墙firewalld报错:ERROR: Exception DBusException: org.freedesktop.DBus.Error.AccessDenied:...](https://www.cnblogs.com/cpw6/p/12050800.html) 重启dbus服务:systemctl restart dbus 再重启firewalld