1.安裝hadoop
2.配置yarn
cd /usr/share/hadoop/hadoop-2.7.7/etc/hadoop
配置yarn-site.xml
sudo vim yarn-site.xml
<configuration>
<!-- 已經(jīng)配置則無需在配 -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>
#保存退出:wq
配置mapred-site.xml
sudo vim mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
#保存退出:wq
3.啟動(dòng)yarn
cd /usr/share/hadoop/hadoop-2.7.7
sudo ./sbin/start-dfs.sh
./sbin/start-yarn.sh
./sbin/mr-jobhistory-daemon.sh start historyserver
4.測試
訪問localhost:8088
看到y(tǒng)arn頁面則配置成功