25 export JAVA_HOME=/home/hadoop/apps/jdk1.8.0_131
1.hadoop-env.sh中配置JAVA_HOME
17 export HADOOP_YARN_USER=/home/hadoop/apps/hadoop-2.6.5
yarn-env.sh 配置hadoop_yarn_user为hadoop_Home
<configuration> <property> <name>dfs.namenode.name.dir</name> <value>/home/hadoop/apps/hadoop-2.6.5/myhadoop/namenode_data</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/home/hadoop/apps/hadoop-2.6.5/myhadoop/datanode_data</value> </property> <property> <name>fs.defaultFS</name> <value>hdfs://mini1:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/home/hadoop/apps/hadoop-2.6.5/tmp</value> </property> </configuration>
core-site.xml,其中hadoop.tmp.dir 很重要,指定了镜像文件放在那里,如果不指定是系统的/tmp文件夹,而且没有子文件夹!
<configuration> <property> <name>dfs.replication</name> <value>2</value> </property> <property> <name>dfs.datanode.ipc.address</name> <value>0.0.0.0:50020</value> </property> <property> <name>dfs.datanode.http.address</name> <value>0.0.0.0:50075</value> </property> </configuration>
hdfs-site.xml dfs.replication 指定副本个数,
dfs.datanode.ipc.address是默认的应该不用配置,
dfs.datanode.http.address也是官网默认的
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
mapred-site.xml 指定mapreduce运行的框架是yarn
<configuration>
<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.resourcemanager.hostname</name>
<value>mini1</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
yarn-site.xml 指定resourcemanager所在机器
http://192.168.1.101:50070 (HDFS管理界面)
http://192.168.1.101:8088 (MR管理界面)