离线安装cdh5.16.1

前置说明:

集群之间的机器时间需要一致,本文是基于阿里云ecs安装测试,故省去安装ntp步骤。

安装jdk过于简单,本文也略过该步骤,本文是基于jdk1.8。

机器配置:

机器名 配置 说明
hadoop001

2 cpu

8G 内存

centos7.6

cloudera-manager

mysql

httpd
hadoop002

2 cpu

8G 内存

centos7.6

 
hadoop003

2 cpu

8G 内存

centos7.6

 

1.安装apache

yum install httpd
ystemctl start httpd

2.通过apache搭建本地yum源

# 配置parcels
mkdir -p /var/www/html/parcels
cd /var/www/html/parcels
wget https://archive.cloudera.com/cdh5/parcels/5/CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel
wget https://archive.cloudera.com/cdh5/parcels/5/CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha1 -O CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha
wget https://archive.cloudera.com/cdh5/parcels/5/manifest.json

# 配置cloudera manager
mkdir -p /var/www/html/cm5/redhat/7/x86_64
cd /var/www/html/cm5/redhat/7/x86_64
wget https://archive.cloudera.com/cm5/repo-as-tarball/5.16.1/cm5.16.1-centos7.tar.gz
tar -zxvf cm5.16.1-centos7.tar.gz
rm cm5.16.1-centos7.tar.gz

配置完成后通过浏览器访问http://hadoop001/parcels/和http://hadoop001/cm5/redhat/7/x86_64/页面如下

离线安装cdh5.16.1_第1张图片

离线安装cdh5.16.1_第2张图片

3.配置yum源(所有节点都需要配置)

vim /etc/yum.repos.d/cloudera-manager.repo

[cloudera-manager]
name = Cloudera Manager, Version 5.16.1
baseurl = http://hadoop001/cm5/redhat/7/x86_64/cm/5/
gpgcheck = 0

4.安装clouder manager

yum install cloudera-manager-daemons cloudera-manager-server

5.安装mysql5.7

# 安装mysql前需要先卸载系统自带的mysql和mariadb,此处略过该步骤,我本地是卸载的mariadb-libs-5.5.60-1.el7_5.x86_64

rpm -i http://mirror.centos.org/centos/7/os/x86_64/Packages/libaio-0.3.109-13.el7.x86_64.rpm
cd /tmp
wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar
tar -xvf mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar
rpm -i mysql-community-server-5.7.26-1.el7.x86_64.rpm mysql-community-common-5.7.26-1.el7.x86_64.rpm mysql-community-client-5.7.26-1.el7.x86_64.rpm mysql-community-libs-5.7.26-1.el7.x86_64.rpm mysql-community-devel-5.7.26-1.el7.x86_64.rpm mysql-community-libs-compat-5.7.26-1.el7.x86_64.rpm
systemctl start mysqld

mysql启动后可以通过

grep 'temporary password' /var/log/mysqld.log

命令查找临时密码。

创建数据库

# mysql5.7安装后需要重置root密码,而且对长度和密码内容有校验规则,此处为了方便关闭了部分校验
set global validate_password_policy=0;
set global validate_password_length=1;
# 以上内容不建议在生产环境设置
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';

# 创建cmf数据库并授权给cmf用户
create database cmf default character set = 'utf8';
grant all privileges on cmf.* to 'cmf'@'%' identified by '1234';

6.配置cloudera-manager数据库

vim /etc/cloudera-scm-server/db.properties

#最终内容如下

com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=hadoop001:3306
com.cloudera.cmf.db.name=cmf
com.cloudera.cmf.db.user=cmf
com.cloudera.cmf.db.password=1234
com.cloudera.cmf.db.setupType=EXTERNAL

7.上传mysql驱动jar包(建议所有节点都配置)

# 最终上传后路径如下(路径和jar包名字都不能改变,否则无法启动)
/usr/share/java/mysql-connector-java.jar

8.启动服务

systemctl start cloudera-scm-server

如果启动有任何异常可以通过查看/var/log/cloudera-scm-server/cloudera-scm-server.out和/var/log/cloudera-scm-server/cloudera-scm-server.log中的日志来分析问题。

启动服务后通过浏览器访问 http://hadoop001:7180/cmf 用户名/密码为admin/admin

9.安装页面配置使用本地源

之后正常安装即可,安装过程中不需要安装自带的jdk,单用户模式也未启用。

本文安装后如下:

离线安装cdh5.16.1_第3张图片

安装过程中需要为oozie/hue/hive/monitor服务配置数据库,正常配置即可。

 

你可能感兴趣的:(大数据)