hadoop安装配置

  

core-site.xml  :  指定HDFS中Name的地址

<property>
<!-- 指定 <name>fs.defaultFS</name> <value>hdfs://hadoop.slave01:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>file:/usr/local/hadoop/tmp</value> <description>A base for other temporary directories</description> </property>

 hdfs-site.xml :指定 HDFS 副本的数量

<property>
    <name>dfs.namenode.name.dir</name>
    <value>file:/usr/local/hadoop/hdfs/name</value>
 </property>
  <property>
     <name>dfs.datanode.data.dir</name>
      <value>file:/usr/local/hadoop/hdfs/data</value>
  </property>
  <property>
     <name>dfs.replication</name>
     <value>3</value>
  </property>
<!-- 辅助节点 --> <property> <name>dfs.namenode.secondary.http-address</name> <value>hadoop.slave03:50090</value> </property>  

yarn.site

<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hadoop.slave02</value>
</property>
</configuration>

  

slaves

hadoop01
hadoop02
hadoop03

marp.site

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
  <name>mapreduce.jobhistory.address</name>
  <value>hadoop.slave01:10020</value>
 </property>
<property>
  <name>mapreduce.jobhistory.webapp.address</name>
   <value>hadoop.slave01:19888</value>
</property>
</configuration>

  

启动的时候要开启动sbin

mr-jobhistory-daemon.sh start historyserver  

不然会出现访问不到10020端口爆出这个错 https://www.cnblogs.com/Jomini/p/11518476.html

原文地址:https://www.cnblogs.com/Jomini/p/11374436.html