# JAVA
export JAVA_HOME=/usr/lib/jdk1.7.0_60
export JRE_HOME=/usr/lib/jdk1.7.0_60/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://cdh0:8020</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/data/dfs/${user.name}</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.name.dir</name>
<value>/data/dfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/data/dfs/dn</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>cdh0:8021</value>
</property>
<property>
<name>mapred.local.dir</name>
<value>/data/mapred/local</value>
</property>
</configuration>
masters
cdh0
slaves
cdh1
同步小脚本
#!/bin/bash
cd /etc/hadoop-0.20/conf.cluster
scp masters slaves hdfs-site.xml core-site.xml mapred-site.xml root@cdh1:/etc/hadoop-0.20/conf.cluster/