1 购买3台阿里云服务
2 配置好ssh连接客户端 根据自己情况连接
3 安装好MySQL5.7 跳过,见之前博客 安装在hadoop001上
4 设置好Hosts文件 3台机器同时操作
vim /etc/hosts
#添加如下 172.24.8.138 hadoop001
172.24.8.136 hadoop002
172.24.8.137 hadoop003
5 关闭防火墙 3台机器同时操作
systemctl stop firewalld.service
systemctl disable firewalld.service
6 安装jdk1.8 3台同时操作
cd /mnt/software
tar -zvxf jdk-8u201-linux-x64.tar.gz
vi /etc/profife
#set Java
export JAVA_HOME=/mnt/software/jdk1.8.0_201
export PATH=.:$JAVA_HOME/bin:$PATH
source /etc/profile
7 安装httpd,3台同时操作
rpm -qa|grep httpd yum install -y httpd systemctl list-unit-files | grep httpd systemctl enable httpd.service systemctl start httpd
8 下载CDH-manager的安装文件 在hadoop001机器上
cd /var/www/html/
mkdir parcels
cd parcels
wget http://archive.cloudera.com/cdh5/parcels/5.12.0/manifest.json
wget http://archive.cloudera.com/cdh5/parcels/5.12.0/CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel
wget http://archive.cloudera.com/cdh5/parcels/5.12.0/CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel.sha1
mv CDH-5.12.-.cdh5.12.0.p0.-el7.parcel.sha1 CDH-5.12.-.cdh5.12.0.p0.-el7.parcel.sha
校验文件是否有损坏,加密字符串一致就没问题
sha1sum CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel
cat CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel.sha
9 拷贝这3个文件到hadoop002,hadoop003对应目录下
scp * root@hadoop002:/var/www/html/parcels
scp * root@hadoop003:/var/www/html/parcels
10 下载tar包并解压到指定目录并传输到另外两台机器
wget http://archive.cloudera.com/cm5/repo-as-tarball/5.12.0/cm5.12.0-centos7.tar.gz
tar -zxf cm5.12.0-centos7.tar.gz -C /var/www/html/
scp -r cm root@hadoop002:/var/www/html/
scp -r cm root@hadoop003:/var/www/html/
cd /var/www/html/cm/5.12.0/RPMS/x86_64
查看软件包
外网访问http://39.104.94.234/cm/ 根据你自己的外网ip查看是否解压文件正常
11 配置CDH的本地yum源,3台机器都操作一遍
vi /etc/yum.repos.d/cloudera-manager.repo
注意:里面的ip设置成你自己hadoop001的内网ip
[cloudera-manager]
name = Cloudera Manager, Version 5.7.0
baseurl = http://172.24.8.138/cm/5/
gpgcheck = 0
curl http://172.24.8.138/cm/5/
检查一下是否可以访问
11 开始安装
在hadoop001上
cd /var/www/html/cm/5/RPMS/x86_64
yum install ./cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el7.x86_64.rpm
yum install -y ./cloudera-manager-server-5.12.0-1.cm5120.p0.120.el7.x86_64.rpm
配置数据库
初始化SQL
create database cmf DEFAULT CHARACTER SET utf8;
grant all on cmf.* TO 'cmf'@'%' IDENTIFIED BY 'Zj314XXX!';
create database amon DEFAULT CHARACTER SET utf8;
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'Zj314XXX!';
flush privileges;
修改配置文件
cd /etc/cloudera-scm-server/
vim db.properties
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# This file describes the database connection.
# # The database type
# Currently 'mysql', 'postgresql' and 'oracle' are valid databases.
com.cloudera.cmf.db.type=mysql # The database host
# If a non standard port is needed, use 'hostname:port'
com.cloudera.cmf.db.host=hadoop001 # The database name
com.cloudera.cmf.db.name=cmf # The database user
com.cloudera.cmf.db.user=cmf # The database user's password
com.cloudera.cmf.db.password=Zj314XXX! # The db setup type
# By default, it is set to INIT
# If scm-server uses Embedded DB then it is set to EMBEDDED
# If scm-server uses External DB then it is set to EXTERNAL
com.cloudera.cmf.db.setupType=EXTERNAL
添加msyql连接驱动,自己上传jar并且重命名
mkdir /usr/share/java
cd /usr/share/java/
cp /mnt/software/mysql-connector-java-5.1.45.jar /usr/share/java/
mv mysql-connector-java-5.1.45.jar mysql-connector-java.jar
启动hadoop001上面的Cloudera-scm-server
service cloudera-scm-server start
12 开通7180的防火墙端口,在阿里云控制台
12 访问Cloudera-manager页面
默认账号密码 admin/admin
13 开始页面配置
根据警告在各个机器上执行
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
期间遇到的问题
https://www.cnblogs.com/QuestionsZhang/p/10434726.html
https://www.cnblogs.com/QuestionsZhang/p/10434626.html
https://www.cnblogs.com/QuestionsZhang/p/10434313.html
https://www.cnblogs.com/QuestionsZhang/p/10433738.html