以在公司搭建的Hadoop爲例。版本Hadoop2.4,存儲在360雲盤中。html
ssh-keygen -t rsa
ssh localhost
# java path
JAVA_HOME=/usr/java/jdk1.7.0_01
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
#hadoop path new
HADOOP_HOME=/usr/hadoop-2.4.0
PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
HADOOP_MAPARED_HOME=${HADOOP_HOME}
HADOOP_COMMON_HOME=${HADOOP_HOME}
HADOOP_HDFS_HOME=${HADOOP_HOME}
YARN_HOME=${HADOOP_HOME}
HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
HDFS_CONF_DIR=${HADOOP_HOME}/etc/hadoop
YARN_CONF_DIR=${HADOOP_HOME}/etc/hadoop
192.168.*.*8 hadoop-test1
192.168.*.*9 hadoop-test2
<property>
<name>fs.defaultFS</name>
<value>hdfs://192.168.*.*8:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/usr/temp</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/usr/hdfs/name</value>
<final>true</final>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/usr/hdfs/data</value>
<final>true</final>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>
export JAVA_HOME=/usr/java/jdk1.7.0_01
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
export JAVA_HOME=/usr/java/jdk1.7.0_01
<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>192.168.*.*8:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>192.168.*.*8:8030</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>192.168.*.*8:8088</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>192.168.*.*8:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>192.168.*.*8:8033</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>192.168.*.*8</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>20480</value>
</property>
hadoop namenode -format
http://10.*.*.*0:50070/
http://10.*.*.*0:8088/