CDH通过rpm包安装

CDH通过rpm包安装

author:wangxing

1. 配置yum源

使用局域网yum源

http://192.168.9.114/cloudera-cdh5.15

2. 安装规划

Hadoop主要包括HDFS和YARN两部分。

通过rpm安装时系统会创建hdfs用户和yarn用户来管理相应的部分,hdfs用户和yarn用户都属于hadoop用户组。

componetrole系统用户用户组
HDFSnamenode,secondarynamenode,datanodehdfshadoop
YARNresourcemanager,nodemanageryarnhadoop

主机信息及安装规划如下:

iphostnamerole
192.168.9.111earthnamenode,resourcemanager
192.168.9.112mercurysecondarynamenode,datanode,nodemanager
192.168.9.113venusdatanode,nodemanager
192.168.9.114marsdatanode,nodemanager
192.168.9.115saturndatanode,nodemanager

3. 安装各个组件

  • 192.168.9.111 earth
yum install zookeeper hadoop hadoop-hdfs hadoop-yarn
yum install hadoop-hdfs-namenode
yum install hadoop-yarn-resourcemanager
  • 192.168.9.112 mercury
yum install zookeeper hadoop hadoop-hdfs hadoop-yarn
yum install hadoop-hdfs-secondarynamenode
yum install hadoop-hdfs-datanode
yum install hadoop-yarn-nodemanager
  • 192.168.9.112 venus
  • 192.168.9.112 mars
  • 192.168.9.112 saturn
yum install zookeeper hadoop hadoop-hdfs hadoop-yarn
yum install hadoop-hdfs-datanode
yum install hadoop-yarn-nodemanager

4. 配置

Hadoop的配置文件目录为/etc/hadoop/conf

hdfs-site.xml

namevalue
dfs.namenode.name.dirfile:///xwtec/dfs/nn
dfs.namenode.checkpoint.dirfile:///xwtec/dfs/snn
dfs.datanode.data.dirfile:///xwtec/dfs/dn

4.1 启动HDFS

在earth上初始化hdfs并启动namenode

# 初始化HDFS
sudo -u hdfs hadoop namenode -format 
# 启动namenode
service hadoop-hdfs-namenode start

在mercury上启动secondarynamenode和datanode

service hadoop-hdfs-secondarynamenode start
service hadoop-hdfs-datanode start

在venus, mars, saturn上启动datanode

service hadoop-hdfs-datanode start

查看HDFS状态 http://192.168.9.111:50070

4.2 启动YARN

在earth上启动resourcemanager

service hadoop-yarn-resourcemanager start

在mercury, venus, mars, saturn上启动nodemanager

service hadoop-yarn-nodemanager start

查看yarn状态 http://192.168.9.111:8088







posted @ 2016-08-10 18:19  iAthena  阅读(2180)  评论(0编辑  收藏  举报