防火墙状态
~]# systemctl status firewalld.service #查看firewalld状态
~]# systemctl stop firewalld #关闭
~]# systemctl start firewalld #开启
~]# systemctl disable firewalld #开机自动关闭 //RHLE7
~]# chkconfig --list|grep network #查看开机是否启动 //RHLE6
~]# systemctl enable firewalld #开机自动启动
放开端口
firewall-cmd --add-port=3306/tcp --permanent
firewall-cmd --reload
关闭seLinux
临时关闭
~]# vim /etc/selinux/config
Enforcing
~]# setenforce 0
setenforce: SELinux is disabled
永久关闭
~]# vim /etc/selinux/config
SELINUX=enforcing
SELINUX=disabled
~]# reboot #重启主机