6.配置hdfs-site.xml文件
所有机器都要执行
[root@Hadoop1 hadoop]# vim hdfs-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<!--DFS中存储文件命名空间信息的目录-->
<name>dfs.name.dir</name>
<value>/opt/hadoop</value>
</property>
<property>
<!--DFS中存储文件数据的目录-->
<name>dfs.data.dir</name>
<value>/opt/hadoop</value>
</property>
<property>
<!--是否对DFS中的文件进行权限控制-->
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<!--设置备份份数-->
<name>dfs.replication</name>
<value>2</value>
</property>
</configuration>
7.配置maperd-site.xml文件
所有机器都要执行
[root@hadoop1 hadoop]# vim mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<!--用来作JobTracker的节点-->
<name>mapred.job.tracker</name>
<value>10.2.34.115:9001</value>
</property>
<property>
<!--map/reduce的系统目录-->
<name>mapred.system.dir</name>
<value>/system/mapred.system.dir</value>
</property>
<property>
<!--map/reduce的临时目录-->
<name>mapred.local.dir</name>
<value>/opt/hadoop/mapred.local.dir</value>
</property>
</configuration>
8配置MASTERS和SLAVES
所有机器都要执行
[root@hadoop1 hadoop]# vim masters
10.2.34.115
~
[root@hadoop1 hadoop]# vim slaves
10.2.34.116
10.2.34.117
