1.安装hadoop
2.配置yarn
cd /usr/share/hadoop/hadoop-2.7.7/etc/hadoop
配置yarn-site.xml
sudo vim yarn-site.xml
<configuration>
<!-- 已经配置则无需在配 -->
<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.启动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
看到yarn页面则配置成功