说明
说明一:此篇为大数据部分第二篇,第一篇见戳链接https://blog.csdn.net/focuson_/article/details/80153371,机器的安装准备说明和zookeeper的安装已经在上一篇博客中说明。
说明二:本文为hadoop的安装,集群分布情况设计为:
机器 |
安装软件 |
进程 |
focuson1 |
zookeeper,hadoop namenode,hadoop DataNode |
JournalNode; DataNode; QuorumPeerMain; NameNode; DFSZKFailoverController;NodeManager |
focuson2 |
zookeeper;hadoop namenode,hadoop DataNode;yarn |
JournalNode; DataNode; QuorumPeerMain; NameNode; DFSZKFailoverController;NodeManager;ResourceManager |
focuson3 |
zookeeper,hadoop DataNode;yarn |
JournalNode; DataNode; QuorumPeerMain;NodeManager;ResourceManager |
安装步骤:
1、压缩包上传到focuson1家目录
cd/usr/local/src/
mkdir hadoop
mv~/hadoop-2.6.0.tar.gz .
tar -xvfhadoop-2.6.0.tar.gz
rm -fhadoop-2.6.0.tar.gz
2、修改配置文件
1》hadoop-env.sh
exportJAVA_HOME=/usr/local/src/java/jdk1.7.0_51//必须要有的
2》yarn 与Hadoop集成
2.1 mapred-site.xml
<configuration>
<configuration>
<!-- 指定mr框架为yarn方式 -->
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
</configuration>
2.2 yarn-site.xml
<configuration>
<!-- Site specific YARNconfiguration properties -->
<!-- 开启RM高可靠-->
<property>
<name>yarn.resourcemanager.ha.enabled</name>
<value>