标签:
修改主机名和IP的映射关系
vim /etc/hosts
192.168.1.168 cacgg168
安装java
export JAVA_HOME=/usr/java/jdk1.6.0_45
export JRE_HOME=/usr/java/jdk1.6.0_45/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH
安装hadoop
mkdir /cloud
#解压到/cloud/目录下
tar -zxvf hadoop-2.4.1.tar.gz -C /cloud/
修改配置文件
hadoop-env.sh
vim hadoop-env.sh
#第27行
export JAVA_HOME=/usr/java/jdk1.6.0_45
core-site.xml
<property>
<name>fs.defaultFS</name>
<value>hdfs://cacgg168:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/cloud/hadoop-2.4.1/tmp</value>
</property>
hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
mapred-site.xml (mv mapred-site.xml.template mapred-site.xml)
mv mapred-site.xml.template mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
yarn-site.xml
<property>
<name>yarn.resourcemanager.hostname</name>
<value>cacgg168</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
export HADOOP_HOME=/cloud/hadoop-2.4.1
$HADOOP_HOME/bin:$HADOOP_HOME/sbin
标签:
原文地址:http://my.oschina.net/u/146932/blog/395907