lty-fly
首先centos7的防火墙由iptables改为了firewalld
1. 执行命令:firewall-cmd --zone=public --add-port=80/tcp  --permanent
    命令含义:
    --zone #作用域
    --add-port=80/tcp   #添加端口  格式为:端口/协议
    --parmanent  #永久生效  没有此参数重启后失效
2. 重启防火墙:systemctl restart firewalld
 
如果要开启其他端口,就将80换成其他的端口即可,比如3306

分类:

技术点:

相关文章:

  • 2022-01-23
  • 2021-11-30
  • 2021-05-19
  • 2022-01-05
  • 2021-09-25
  • 2022-02-09
  • 2021-09-30
猜你喜欢
  • 2021-11-20
  • 2021-11-30
  • 2021-11-30
  • 2022-01-07
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案