本文主要是介绍centos7启动iptable服务错edirecting to /bin/systemctl status iptables.serviceUnit iptables.service could,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
当我们想要安装iptables的时候
执行命令:yum install -y iptables
输出:
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
mysql-connectors-community | 2.6 kB 00:00:00
mysql-tools-community | 2.6 kB 00:00:00
mysql57-community | 2.6 kB 00:00:00
os | 3.6 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): epel/7/x86_64/updateinfo | 1.1 MB 00:00:00
(2/3): epel/7/x86_64/primary_db | 7.0 MB 00:00:01
(3/3): updates/7/x86_64/primary_db | 16 MB 00:00:01
Package iptables-1.4.21-35.el7.x86_64 already installed and latest version
Nothing to do
为什么会这样?
[root@VM-24-15-centos sysconfig]# service iptables status(再执行查看状态)
输出:
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.
因为在centos7后,负责管理防火墙的是firewalld
我们需要关闭并注销后再重新yum安装iptable与开启服务
systemctl stop firewalld---停止
systemctl mask firewalld---注销
然后重新安装
yum install -y iptables
接下来就可以进行iptable的操作了
这篇关于centos7启动iptable服务错edirecting to /bin/systemctl status iptables.serviceUnit iptables.service could的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!