未找到CentOS 7 firewall-cmd

前端之家收集整理的这篇文章主要介绍了未找到CentOS 7 firewall-cmd前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我刚刚安装了CentOS 7:
[root@new ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core) 

我正在尝试配置防火墙,我被告知在CentOS 7中不再使用iptables,而是由firewalld取代.尝试运行命令以设置防火墙规则时:

firewall-cmd --add-port=80/tcp

我收到以下消息:

[root@new ~]# firewall-cmd --add-port=80/tcp
-bash: firewall-cmd: command not found

编辑:我也尝试了以下命令:

[root@new ~]# firewall-offline-cmd --add-port=80/tcp
-bash: firewall-offline-cmd: command not found

没有任何成功.

我尝试运行以下命令来检查firewalld是否已安装:

[root@new ~]# service firewalld status
Redirecting to /bin/systemctl status  firewalld.service
firewalld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

输出之后,我尝试启动firewalld:

[root@new ~]# service firewalld start
Redirecting to /bin/systemctl start  firewalld.service
Failed to issue method call: Unit firewalld.service Failed to load: No such file or directory.

任何想法CentOS 7安装有什么问题?这是OpenVZ VPS上的干净安装,我还没有做任何改动.

两种可能的选择

>您的PATH不包含/usr/bin
>未安装firewall-cmd

> yum安装firewalld

原文链接:https://www.f2er.com/centos/374050.html

猜你在找的CentOS相关文章