1:第一种方式
查看linux系统版本 :cat /etc/redhat-release
centos7用开启mysql数据库:systemctl start mysqld
centos7用重启mysql数据库:systemctl restart mysqld
1:查看防火状态
systemctl status firewalld
service iptables status
2:暂时关闭防火墙
systemctl stop firewalld
service iptables stop
3:永久关闭防火墙
systemctl disable firewalld
chkconfig iptables off
4:重启防火墙
systemctl enable firewalld
service iptables restart
2:第二种方式
查看防火墙状态: systemctl status firewalld.service
执行关闭命令: systemctl stop firewalld.service
再次执行查看防火墙命令:systemctl status firewalld.service
执行开机禁用防火墙自启命令 : systemctl disable firewalld.service
关于防火墙的其他命令:
启动:systemctl start firewalld.service
防火墙随系统开启启动 : systemctl enable firewalld.service