部署上,很简单,就是分成两部分:修改配置文件盒启动脚本。
一:修改配置文件:
hadoop2.2的配置文件在/opt/hadoop-2.2.0/etc/hadoop文件夹下,具体配置文件修改如下:
1、修改/etc/hosts文件(sudo gedit /etc/hosts)
192.168.222.154 hd2-single
2、修改core-site.xml
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/sujx/hadoop/tmp</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hd2-single:9000</value>
<final>true</final>
</property>
</configuration>
fs.defaultFS:HDFS文件系统的URL
3. 修改hdfs-site.xml
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/sujx/hadoop/dfs/name</value>
<final>true</final>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/sujx/hadoop/dfs/data</value>
<final>true</final>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
4. 修改mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapred.system.dir</name>
<value>file:/home/sujx/hadoop/mapred/system</value>
<final>true</final>
</property>
<property>
<name>mapred.local.dir</name>
<value>file:/home/sujx/hadoop/mapred/local</value>
<final>true</final>
</property>
</configuration>
相关阅读: