sudo firewall-cmd --reload FirewallD is not running
时间: 2024-04-18 17:21:30 浏览: 19
sudo firewall-cmd --reload是用于重新加载FirewallD防火墙配置的命令。FirewallD是Linux系统上的一个动态防火墙管理工具,它提供了一种简单的方式来配置和管理系统的防火墙规则。
当你运行sudo firewall-cmd --reload命令时,它会重新加载FirewallD的配置文件,并应用新的规则。这对于在修改了防火墙规则后使其生效非常有用。
如果你运行该命令时出现"FirewallD is not running"的错误提示,意味着FirewallD服务当前没有在运行。你可以通过运行sudo systemctl start firewalld命令来启动FirewallD服务,然后再尝试重新加载配置。
相关问题
FirewallD is not running [root@VM-16-9-centos mydata]# firewall-cmd --reload FirewallD is not running
FirewallD is a firewall management tool used in CentOS and other Linux distributions. The error message "FirewallD is not running" indicates that the FirewallD service is not currently active or running on your system.
To resolve this issue, you can try starting the FirewallD service using the following command:
```
sudo systemctl start firewalld
```
If the service starts successfully, you should see a message indicating that the FirewallD service has started. You can then try running the `firewall-cmd --reload` command again to reload the firewall rules.
If the issue persists, you may need to check if the FirewallD service is enabled to start at boot. You can do this by running the following command:
```
sudo systemctl enable firewalld
```
This will ensure that the FirewallD service starts automatically when you boot your system.
-bash: firewall-cmd: command not found
-bash: firewall-cmd: command not found错误提示表示找不到firewall-cmd命令。这通常是由于未安装或未正确配置防火墙导致的。要解决这个问题,可以按照以下步骤进行操作:
1. 确认防火墙是否已正确安装。可以使用以下命令检查firewalld服务的状态:
```
sudo systemctl status firewalld
```
如果显示"Active: active (running)",则表示防火墙已安装并运行。否则,需要安装并启动防火墙。
2. 如果防火墙未安装,请使用以下命令进行安装:
```
sudo yum install firewalld
```
或
```
sudo apt-get install firewalld
```
3. 安装完成后,使用以下命令启动防火墙并设置开机自启动:
```
sudo systemctl start firewalld
sudo systemctl enable firewalld
```
4. 最后,重新运行你的命令:
```
sudo firewall-cmd --zone=public --add-port=6789/tcp --permanent
sudo firewall-cmd --reload
```
以上是解决-bash: firewall-cmd: command not found错误的一般步骤。如果问题仍然存在,请提供更多详细信息以便我们提供更准确的解决方案。