徹底關閉CentOS 7.0的防火牆
阿新 • • 發佈:2019-02-01
必須都執行,不要問什麼。要不你的hadoop叢集肯定出問題。
sudo systemctl stop firewalld.service
sudo systemctl disable firewalld.service
sudo systemctl stop iptables.service
sudo systemctl disable iptables.service
sudo vim /etc/selinux/config
註釋下面兩行:
#SELINUX=enforcing
#SELINUXTYPE=targeted
sudo setenforce 0
一、配置防火牆,開啟80埠、3306埠
CentOS 7.0預設使用的是firewall作為防火牆,這裡改為iptables防火牆。
1、關閉firewall:
systemctl stop firewalld.servi(www.111cn.net)ce #停止firewall
systemctl disable firewalld.service #禁止firewall開機啟動
2、安裝iptables防火牆
yum install iptables-services #安裝from:http://www.111cn.net/sys/CentOS/63646.htm