Centos7关闭防火墙时遇到的错误Failed to start firewalld.service: Unit not found. Unit firewalld.service could no

本文讲述了在CentOS7系统中遇到firewalld服务找不到的问题,通过检查是否安装了firewalld并逐步执行`yuminstall`,`unmask`,`enable`,`start`等systemctl命令,最终成功解决防火墙的相关操作问题。

CentOS 运维避坑实战

CentOS7.9 安装 Python3.8.16 后 yum 报错,快速修复方案

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 //在不改变状态的条件下重新加载防火墙
 

更多精彩内容,关注我们▼

CentOS 运维避坑实战

CentOS7.9 安装 Python3.8.16 后 yum 报错,快速修复方案

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值