CDH6.3.1安装⽂档⼀、环境准备
1.1硬件:centos7.6
2.1软件:
jdk1.8
mysql5.7
MySQL JDBC jar
cm6.3.1
连接:archive.cloudera/cm6/6.3.1/repo-as-tarball/cm6.3.
Parcel:
archive.cloudera/cdh6/6.3.1/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel archive.cloudera/cdh6/6.3.1/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1 archive.cloudera/cdh6/6.3.1/parcels/manifest.json
以上软件打包近⽹盘中,可⾃取:
⼆、环境初始化
1、设置Linux主机名
各⾃节点执⾏修改主机名命令:
hostnamectl set-hostname cm
1.1修改 /etc/hostname 为⾃⼰想要的名字
然后编辑 /etc/hosts,如下
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 /f
#time
p.org iburst
p.org iburst
p.org iburst
p.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/ -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
安装MySQL(主节点安装即可)
安装步骤:
(1)此处需要注意的是centos 7 默认安装的是mariadb,如果不卸载直接安装的话会报错,报错信息mariadb-libs is obsoleted by mysql-community-libs-5.7.20-1.el7.x86_64
rpm -qa | grep mariadb #查看安装信息
rpm -e mariadb-libs* --nodeps #根据查到的软件包信息卸载
(2)安装MySQL(前四个必须按以下顺序安装,因为有依赖)
rpm -ivh mysql-community-common-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.20-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-compat-5.7.20-1.el7.x86_64.rpm
(3)基本设置
# 启动服务
systemctl start mysqld.service
# 在⽇志中会⽣成初始密码
vim /var/log/mysqld.log
# 登录
mysql -uroot -p
# 设置密码
set password = password('test01.') #设置密码
#授权⽤户root使⽤密码passwd从任意主机连接到mysql服务器
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpasswd' WITH GRANT OPTION; flush privileges;
7、创建CDH源数据库、⽤户、amon服务的数据库
linux安装jdk rpm安装create database cmf DEFAULT CHARACTER SET utf8;
create database amon DEFAULT CHARACTER SET utf8;
grant all on cmf.* TO 'cmf'@'%' IDENTIFIED BY 'cmf';
grant all on cmf.* TO 'cmf'@'localhost' IDENTIFIED BY 'cmf';
grant all on cmf.* TO 'cmf'@'主机名' IDENTIFIED BY 'cmf';
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon';
grant all on amon.* TO 'amon'@'localhost' IDENTIFIED BY 'amon';
grant all on amon.* TO 'amon'@'主机名' IDENTIFIED BY 'amon';
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. -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_search/g" /etc/cloudera-scm-agent/config.ini
1.5【修改主节点】的server配置
[root@node06 x86_64]# vim /etc/cloudera-scm-server/db.properties
pe=mysql
f.db.search
f.db.name=cmf
f.db.user=cmf
f.db.search
f.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
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页⾯操作
登录界⾯,默认登录⽤户名和密码都是admin
登录界⾯
安装集
1. 选择安装版本
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论