CDH6.3.1 安装文档

一、简述

近期公司准备部分技术预研项目,打算用比较新CDH6.3.1部署。

ps:

官方要求:https://docs.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_requirements_supported_versions.html

 

二、环境准备

1、硬件:

Linux发行版本:CentOS 7.4

IP Host  CPU(E5-2630) Memory(M393A4K40CB1) Disk
10.295.102.10 node10.research.com 40 cores 128G 3.6T * 2
10.295.102.6 node06.research.com 40 cores 128G 3.6T * 2
10.295.102.7 node07.research.com 40 cores 128G 3.6T * 2

 

 

  

   

 

2、软件

JDK:jdk-8u181-linux-x64.tar.gz

连接:https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

 

MySQL:mysql-5.7.26-el7-x86_64.tar.gz

连接:https://dev.mysql.com/downloads/mysql/5.7.html#downloads

 

MySQL JDBC jar:mv mysql-connector-java-5.1.47.jar mysql-connector-java.jar

连接:http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.47/mysql-connector-java-5.1.47.jar

 

CM:CM6.3.1

连接:https://archive.cloudera.com/cm6/6.3.1/repo-as-tarball/cm6.3.1-redhat7.tar.gz

 

Parcel:

https://archive.cloudera.com/cdh6/6.3.1/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel

https://archive.cloudera.com/cdh6/6.3.1/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1

https://archive.cloudera.com/cdh6/6.3.1/parcels/manifest.json

 

 

以上软件打包近网盘中,可自取:

链接:https://pan.baidu.com/s/1UH50Uweyi7yg6bV7dl02mQ 
提取码:nx7p

三、环境初始化

1、设置Linux主机名

各自节点执行修改主机名命令:

 hostnamectl set-hostname node06.research.com

 hostnamectl set-hostname node07.research.com

 hostnamectl set-hostname node10.research.com

 

每个节点上都添加一下内容至 /etc/hosts:

10.295.102.6 node06.research.com
10.295.102.7 node07.research.com
10.295.102.10 node10.research.com

 

2、关闭集群防火墙

 每个节点上执行

systemctl stop firewalld && systemctl disable firewalld && iptables -F

 

3、关闭集群selinux

 vi /etc/selinux/config 

 SELINUX=disabled

修改成disabled之后 重启linux系统生效

4、设置集群时钟同步

 
所有节点设置亚洲上海海时区
[root@node06 ~]# timedatectl set-timezone Asia/Shanghai
[root@node07 ~]# timedatectl set-timezone Asia/Shanghai
[root@node10 ~]# timedatectl set-timezone Asia/Shanghai
 
#所有节点安装ntp
[root@node06 ~]# yum install -y ntp
 
#选取node06为ntp的主节点
[root@node06 ~]# vi /etc/ntp.conf
#time

server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

#当外部时间不不可⽤用时,可使⽤用本地硬件时间
server 127.127.1.0 iburst local clock
#允许哪些⽹网段的机器器来同步时间
restrict 172.21.230.0 mask 255.255.255.0 nomodify notrap
#开启ntpd及查看状态
[root@node06 ~]# systemctl start ntpd
[root@node06 ~]# systemctl status ntpd
 

5、每个节点部署JDK

[root@node06 ~]# mkdir /usr/java
[root@node06 ~]# tar -zxf cdh/jdk-8u191-linux-x64.tar.gz -C /usr/java/
[root@node06 ~]# chown -R root:root /usr/java/jdk1.8.0_191
[root@node06 ~]# echo "export JAVA_HOME=/usr/java/jdk1.8.0_191" >> /etc/profile
[root@node06 ~]# echo "export PATH=/usr/java/jdk1.8.0_191/bin:${PATH}" >> /etc/profile 
[root@node06 ~]# source /etc/profile
[root@node06 ~]# which java
/usr/java/jdk1.8.0_191/bin/java

[root@node06 ~]# java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

6、主节点部署MySQL

 参考:https://github.com/Hackeruncle/MySQL/blob/master/MySQL%205.7.11%20Install.txt

7、创建CDH源数据库、用户、amon服务的数据库

 

create database cmf DEFAULT CHARACTER SET utf8;
create database amon DEFAULT CHARACTER SET utf8;
grant all on cmf.* TO 'cmf'@'%' IDENTIFIED BY 'www.research.com';
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'www.research.com';
flush privileges;

 

8、主节点部署JDBC

[root@node06 ~]# mkdir -p /usr/share/java
[root@node06 ~]# cp cdh/mysql-connector-java-5.1.47.jar /usr/share/java/
[root@node06 ~]# cd /usr/share/java/
[root@node06 java]# mv mysql-connector-java-5.1.47.jar mysql-connector-java.jar 
[root@node06 java]#

 

四、CDH部署

1、离线部署CM server及agent

 1.1【所有节点】 创建软件目录解压软件

[root@node06 opt]# mkdir cloudera-manager
[root@node06 opt]# cd
[root@node06 ~]# cd cdh
[root@node06 cdh]# tar -zxf cm6.3.1-redhat7.tar.gz -C/opt/cloudera-manager

 

1.2【06主节点执行】 选择06为主节点作为cm server,直接部署

[root@node06 cdh]# cd /opt/cloudera-manager/cm6.3.1/RPMS/x86_64/
[root@node06 x86_64]# rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
[root@node06 x86_64]# rpm -ivh cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm --nodeps --force 

1.3【所有节点(包含主节点)】 选择所有节点作为cm agent,直接部署

cd /opt/cloudera-manager/cm6.3.1/RPMS/x86_64
rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --force

 

1.4【所有节点】修改agent配置,指向server节点06

sed -i "s/server_host=localhost/server_host=node06.research.com/g" /etc/cloudera-scm-agent/config.ini

 

1.5【修改主节点】的server配置

[root@node06 x86_64]# vim /etc/cloudera-scm-server/db.properties

com.cloudera.cmf.db.type=mysql

com.cloudera.cmf.db.host=node06.research.com

com.cloudera.cmf.db.name=cmf

com.cloudera.cmf.db.user=cmf

com.cloudera.cmf.db.password=www.research.com

com.cloudera.cmf.db.setupType=EXTERNAL

 

2、主节点部署离线parcel源

 2.1 安装httpd

yum install -y httpd 

 

2.2 部署离线parcel源 

[root@node06 ~]# mkdir -p /var/www/html/cdh6_parcel
[root@node06 ~]# cp cdh/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel /var/www/html/cdh6_parcel/
[root@node06 ~]# mv cdh/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1 /var/www/html/cdh6_parcel/CDH-6.3.1[root@node[root@node06 ~]# mv cdh/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1 /var/www/html/cdh6_parcel/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha
[root@node06 ~]# mv cdh/manifest.json /var/www/html/cdh6_parcel/
[root@node06 ~]# systemctl start httpd

 

2.3 页面访问http://10.295.102.6/cdh6_parcel/

 

 

 

3、06主节点启动server

[root@node06 ~]# systemctl start cloudera-scm-server
[root@node06 ~]# ll /var/log/cloudera-scm-server/ 
total 20
-rw-r----- 1 cloudera-scm cloudera-scm 16679 Dec 10 18:27 cloudera-scm-server.log
-rw-r----- 1 cloudera-scm cloudera-scm 0 Dec 10 18:27 cmf-server-nio.log
-rw-r----- 1 cloudera-scm cloudera-scm 0 Dec 10 18:27 cmf-server-perf.log
[root@node06 ~]# tail /var/log/cloudera-scm-server/cloudera-scm-server.log

 

4、所有节点启动agent

 systemctl start cloudera-scm-agent 

5、web页面操作

5.1登录主节点的7180端口

 http://node06.research.com:7180/

 

5.2输入账号密码

admin/admin

 

 

 

5.3 选择免费版本

 

 

 5.4.创建集群

 

 

 

输入集群的host,以逗号隔开 

 

 

 填写上面配置好的本地镜像

 

 

 

 

 

 更多选项中添加搭建的http镜像

 

 继续下一步

 

 JDK安装过了不用选,继续

 

 填写3台主机的linux root密码

 

posted @ 2019-12-28 17:46  西二旗老实人  阅读(4669)  评论(1编辑  收藏  举报