We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70e402c commit 032ac92Copy full SHA for 032ac92
CentOS6-and-CentOS7.md
@@ -34,6 +34,17 @@
34
- `systemctl is-enabled httpd` #查看httpd服务是否开机启动
35
- 对于启动脚本的存放位置,也不再是 `/etc/init.d/`(这个目录也是存在的),而是 `/usr/lib/systemd/system/`
36
37
+### 开放端口
38
+
39
+- 添加端口:`firewall-cmd --zone=public --add-port=8883/tcp --permanent`
40
+- 重启防火墙:`firewall-cmd --reload`
41
+ - 命令解释:
42
+ - `--zone` #作用域
43
+ - `--add-port=80/tcp` #添加端口,格式为:端口/通讯协议
44
+ - `--permanent` #永久生效,没有此参数重启后失效
45
+- 列出所有端口列表:`firewall-cmd --list-all`
46
47
48
## 关闭 firewall 使用 iptables
49
50
- 关闭 firewall
0 commit comments