彻底关闭CentOS 7.0的防火墙

必须都执行,不要问什么。要不你的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

 



版权声明:本文为nenusoul_csdn原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。