hadoop2.x分佈式集羣安裝配置 ~第一步:防火牆的配置

    ####在配防火牆時,能關就關,不能關就開端口node

1、介紹tcp

(1)若是是僞分佈式模式,能夠考慮將防火牆直接關掉(通常不用於生產,按照分佈式的來也能夠,2將介紹分佈式的)分佈式

             查看防火牆狀態,命令:service iptables statusoop

             改變防火牆命令:     spa

           1)永久性生效,重啓後不會復原 orm

           開啓: chkconfig iptables on 關閉: chkconfig iptables off ip

           2)即時生效,重啓後復原 hadoop

           開啓: service iptables start 關閉: service iptables stop it

         咱們要作的是:命令:service iptables status 來查看防火牆是否啓動,啓動了就關閉: service iptables stop ,無論原先防火牆是否啓動,以命令: chkconfig iptables  --list查看服務開機開啓狀態,用: chkconfig iptables off將狀態設爲offtable

      (2)若是是分佈式模式,就要請管理員將防火牆中須要的端口開啓,:他確定不會爲你hadoop關防火牆,若是本身管防火牆,能夠進行如下配置:

       修改/etc/sysconfig/iptables 文件,添加如下內容: 

        -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT 

         -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

       裏面的80 ,22是端口號,加你須要的端口便可。

2、錯誤總結

      1.防火牆問題會致使你找不到節點機器,有的時候你namenode起來了,datanode未啓,報錯不知道data的hosts和service時,就多是防火牆未配好。

相關文章
相關標籤/搜索