码迷,mamicode.com
首页 > 其他好文 > 详细

CDH通过rpm包安装

时间:2016-08-10 19:07:34      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

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







CDH通过rpm包安装

标签:

原文地址:http://www.cnblogs.com/iathena/p/55c9870f372bf95cc65754a5008dfe97.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!