Cloudera Manager 安装 CDH5

文档说明

本文是针对Linux CentOS6服务器与CDH5.15的安装手册。

关于CDH和ClouderaManager

CDH(Cloudera's Distribution, includingApache Hadoop),是Hadoop众多分支中的一种,由Cloudera维护,基于稳定版本的Apache Hadoop构建,并集成了很多补丁,可直接用于生产环境。

ClouderaManager(本文以下简称为CM)则是为了便于在集群中进行Hadoop等大数据处理相关的服务安装和监控管理的组件,对集群中主机、Hadoop、Hive、Spark等服务的安装配置管理做了极大简化

术语介绍

CM: Cloudera Manager (Cloudera公司专有的Hadoop集群管控平台);

CDH: Cloudera Distributed Hadoop(Cloudera公司重新打包发布的Hadoop版本);

HDFS:分布式文件系统;

HBASE: 基于HADOOP的分布式、列式存储数据库;

HIVE: 基于大数据技术(文件系统+运算框架)的SQL数据仓库工具;

MAPREDUCE: 分布式运算程序开发框架;

SPARK:为大规模数据处理而设计的快速通用的计算引擎;

ZOOKEEPER: 分布式协调服务基础组件;

YARN: 负责集群资源的统一管理和调度,分配系统资源给各个应用程序。

基础环境准备

关闭防火墙:/etc/init.d/iptables stop  && chkconfig iptables off

关闭NetworkManager:/etc/init.d/NetworkManager stop && chkconfig NetworkManager off

SeLinux设为disabled: setenforce 0

yum源仓库的配置:本次部署使用了公司yum源

主机规划

 

软件安装

MySQL安装

因为需要安装数据库,所以安装了mysql5.6此时需要卸载系统自带的mysql-lib-5.1

[root@hdp01 yum.repos.d]# rpm -qa | grep mysql
mysql-client-5.6.24-1.x86_64
mysql-server-5.6.24-1.x86_64

安装cloudera时需要mysql-lib,此时我们需要在
官网:https://downloads.mysql.com/archives/community/
下载:MySQL-shared-compat和MySQL-shared安装,选择和安装的mysql相应的版本
启动mysql,并操作修改密码等一系列事宜

 cloudera安装

本次cloudera目录结构如下:

[root@hdp01 ~]# tree /opt/cloudera/
/opt/cloudera/
├── csd
│   └── SPARK2_ON_YARN-2.3.0.cloudera2.jar
└── parcel-repo
    ├── CDH-5.14.2-1.cdh5.14.2.p0.3-el6.parcel
    ├── CDH-5.14.2-1.cdh5.14.2.p0.3-el6.parcel.sha
    ├── CDH-5.14.2-1.cdh5.14.2.p0.3-el6.parcel.torrent
    ├── SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el6.parcel
    ├── SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el6.parcel.sha
    └── SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el6.parcel.torrent

2 directories, 7 files
[root@hdp01 ~]# ll /opt/cloudera/
total 8
drwxr-xr-x 2 cloudera-scm cloudera-scm 4096 Nov 21 14:23 csd
drwxr-xr-x 2 cloudera-scm cloudera-scm 4096 Nov 22 10:38 parcel-repo
[root@hdp01 ~]# ll /opt/cloudera/parcel-repo/
total 1990652
-rw-r----- 1 cloudera-scm cloudera-scm 1849673608 Nov 20 16:04 CDH-5.14.2-1.cdh5.14.2.p0.3-el6.parcel
-rw-r----- 1 cloudera-scm cloudera-scm         41 Nov 20 16:04 CDH-5.14.2-1.cdh5.14.2.p0.3-el6.parcel.sha
-rw-r----- 1 cloudera-scm cloudera-scm      70726 Nov 21 11:13 CDH-5.14.2-1.cdh5.14.2.p0.3-el6.parcel.torrent
-rw-r----- 1 cloudera-scm cloudera-scm  188656280 Nov 20 16:04 SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el6.parcel
-rw-r----- 1 cloudera-scm cloudera-scm         41 Nov 20 16:04 SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el6.parcel.sha
-rw-r----- 1 cloudera-scm cloudera-scm       7381 Nov 21 11:13 SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el6.parcel.torrent
[root@hdp01 ~]# ll /opt/cloudera/csd/
total 20
-rw-r--r-- 1 root root 19010 Apr 17  2018 SPARK2_ON_YARN-2.3.0.cloudera2.jar

本次使用单位的yum源,如果没有yum源,请手动下载下软件进行安装

cloudera-manager 下载地址:
http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.14.3/RPMS/x86_64/

spark-2 下载地址:
http://archive.cloudera.com/spark2/parcels/2.3.0.cloudera2/

  SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el7.parcel
  SPARK2-2.3.0.cloudera2-1.cdh5.13.3.p0.316101-el7.parcel.sha

cdh 下载地址:
http://archive.cloudera.com/cdh5/parcels/5.14.2/

  CDH-5.14.2-1.cdh5.14.2.p0.3-el7.parcel
  CDH-5.14.2-1.cdh5.14.2.p0.3-el7.parcel.sha

yum安装:

server端安装:

yum inshall cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server oracle-j2sdk1.7

client端安装:

yum install cloudera-manager-daemons cloudera-manager-agent oracle-j2sdk1.7

配置修改

所有节点执行

echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
#修改:vim /etc/cloudera-scm-agent/config.ini
server_host=
添加:vim /etc/sysctl.conf
vm.swappiness = 10
sysctl -p

 master节点执行

修改:vim /etc/cloudera-scm-server/db.properties
    com.cloudera.cmf.db.type=mysql
    com.cloudera.cmf.db.host=localhost
    com.cloudera.cmf.db.name=cmf
    com.cloudera.cmf.db.user=root
    com.cloudera.cmf.db.setupType=EXTERNAL
    com.cloudera.cmf.db.password=123456

mysql中创建数据库,并进行连接

/usr/share/cmf/schema/scm_prepare_database.sh mysql cmf root 123456

所有节点下载 mysql-connector-java-5.1.46.tar.gz,上传至服务器并解压

cp mysql-connector-java-5.1.46-bin.jar /usr/share/java/oracle-connector-java.jar

下载spark插件

cd /opt/cloudera/csd
wget http://yum.ncfgroup.org/cloudera/spark2/csd/SPARK2_ON_YARN-2.3.0.cloudera2.jar

 启动cloudera

server端:/etc/init.d/cloudera-scm-server start
agent端:/etc/init.d/cloudera-scm-agent start

 

 CDH集群安装

ClouderaManager浏览器默认管理账号:/http://hdp01.yxdev.wx:7180

  User:admin
  Password:admin

 

posted @ 2018-11-29 17:04  隔壁王师傅  阅读(499)  评论(0编辑  收藏  举报