本文主要是介绍01_服务器开关火墙、端口,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、Centos7
CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样
开放端口
firewall-cmd --permanent --add-port=80/tcp 永久开放80端口
关闭端口
firewall-cmd --permanent --remove-port=80/tcp 永久关闭80端口
查询开放的端口
firewall-cmd --list-ports 列出已经开放的端口
firewall-cmd --permanent --list-ports 列出已经永久开放的端口
开启防火墙
systemctl start firewalld.service
关闭防火墙
systemctl stop firewalld.service
查看防火墙状态
systemctl status firewalld
# 或
firewall-cmd --state
二、WinServer
博客地址
三、映射数据库
重启数据库后,服务都停止了。
一、开启监听
登陆8080,主机/所有主机列表,选中echod后开启监听。
二、启动服务
Cluster1/Cluster1,操作/启动集群。
这篇关于01_服务器开关火墙、端口的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!