hadoop 許多內設通訊都預設為 0.0.0.0 也就是沒有限制網域, 因此管理上就需要多注意, 若要限制網域, 則可如下的快速設定方式可參考. 主要增加 local.bind.address 參數項, 來指定 http address IP
► hadoop-env.sh
from http://blog.csdn.net/cheersu/article/details/8191743
► hadoop-env.sh
bind_ip=192.168.0.110
export BIND_OPTS="-Dlocal.bind.address=${bind_ip}"
export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS $BIND_OPTS"
export HADOOP_SECONDARYNAMENODE_OPTS="...nt.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS $BIND_OPTS"
export HADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS $BIND_OPTS"
export HADOOP_BALANCER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS $BIND_OPTS"
export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS $BIND_OPTS"
export HADOOP_TASKTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_TASKTRACKER_OPTS $BIND_OPTS"
export BIND_OPTS="-Dlocal.bind.address=${bind_ip}"
export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS $BIND_OPTS"
export HADOOP_SECONDARYNAMENODE_OPTS="...nt.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS $BIND_OPTS"
export HADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS $BIND_OPTS"
export HADOOP_BALANCER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS $BIND_OPTS"
export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS $BIND_OPTS"
export HADOOP_TASKTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_TASKTRACKER_OPTS $BIND_OPTS"
► hdfs-site.xml
<property>
<name>dfs.http.address</name>
<value>${local.bind.address}:50070</value>
</property>
<property>
<name>dfs.https.address</name>
<value>${local.bind.address}:50470</value>
</property>
<property>
<name>dfs.secondary.http.address</name>
<value>${local.bind.address}:50090</value>
</property>
<property>
<name>dfs.datanode.address</name>
<value>${local.bind.address}:50010</value>
</property>
<property>
<name>dfs.datanode.ipc.address</name>
<value>${local.bind.address}:50020</value>
</property>
<property>
<name>dfs.datanode.http.address</name>
<value>${local.bind.address}:50075</value>
</property>
<property>
<name>dfs.datanode.https.address</name>
<value>${local.bind.address}:50475</value>
</property>
► mapred-site.xml
<name>dfs.http.address</name>
<value>${local.bind.address}:50070</value>
</property>
<property>
<name>dfs.https.address</name>
<value>${local.bind.address}:50470</value>
</property>
<property>
<name>dfs.secondary.http.address</name>
<value>${local.bind.address}:50090</value>
</property>
<property>
<name>dfs.datanode.address</name>
<value>${local.bind.address}:50010</value>
</property>
<property>
<name>dfs.datanode.ipc.address</name>
<value>${local.bind.address}:50020</value>
</property>
<property>
<name>dfs.datanode.http.address</name>
<value>${local.bind.address}:50075</value>
</property>
<property>
<name>dfs.datanode.https.address</name>
<value>${local.bind.address}:50475</value>
</property>
<property>
<name>mapred.job.tracker.http.address</name>
<value>${local.bind.address}:50030</value>
</property>
<property>
<name>mapred.task.tracker.http.address</name>
<value>${local.bind.address}:50060</value>
</property>
<name>mapred.job.tracker.http.address</name>
<value>${local.bind.address}:50030</value>
</property>
<property>
<name>mapred.task.tracker.http.address</name>
<value>${local.bind.address}:50060</value>
</property>
from http://blog.csdn.net/cheersu/article/details/8191743