1 文档编写目的
CDP DC7.0.3是Cloudera与Hortonworks合并后,第一个融合CDH和HDP所有组件的on-premise版本,CDP Data Center主要由Cloudera Runtime构成,Cloudera Runtime由超过35个开源项目组成,当然CDP Data Center还包括其它功能如管理功能Cloudera Manager,Key Management,专业支持等,如下图所示:
Cloudera Runtime的主要组件版本如下图所示:
Component | Apache Version |
---|---|
Atlas | 2.0.0 |
Avro | 1.8 |
DAS | 1.4 |
Hadoop | 3.1 |
HBase | 2.2 |
Hive | 3.1 |
Hive Warehouse Connector | 1.0 (Technical Preview) |
Hue | 4.3 |
Impala | 3.3 |
Kafka | 2.3 |
Kudu | 1.11 |
Oozie | 5.1 |
ORC | 1.5 |
Ozone | 0.4.0 (Technical Preview) |
Parquet | 1.1 |
Phoenix | 5 |
Ranger | 2 |
Solr | 7.4 |
Spark | 2.4 |
Sqoop | 1.4 |
Tez | 0.9 |
Zookeeper | 3.5.5 |
本文档Fayson主要描述如何在Redhat7.6安装CDP DC7.0.3。CDP DC7与CDH5/6的安装步骤一致,主要包括以下四部分:
1.安全前置准备,包括安装操作系统、关闭防火墙、同步服务器时钟等;
2.外部数据库如MySQL安装
3.安装Cloudera Manager;
4.安装CDH集群;
- 测试环境
1.CM和CDH版本为7.0.3
2.Redhat7.6
3.OpenJDK1.8.0_232
4.MariaDB-5.5.64
5.root用户安装
2 前置准备
2.1 hostname及hosts配置
集群中各个节点之间能互相通信使用静态IP地址。IP地址和主机名通过/etc/hosts配置,主机名通过/etc/hostname进行配置。
以cm节点(172.31.2.24)为例:
1.hostname配置,建议你将hostname配置为有意义的字母或单词组合,比如cdp01,请不要使用localhost作为主机名,也不要使用下划线或者其它特殊字符作为主机名。/etc/hostname文件示例如下:
[root@ip-172-31-2-24 ~]# cat /etc/hostname
ip-172-31-2-24.ap-southeast-1.compute.internal
2.hosts配置需要将集群的所有主机都加入进来,包括客户端节点,管理节点和工作节点。/etc/hosts文件示例如下:
[root@ip-172-31-2-24 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.31.2.24 ip-172-31-2-24.ap-southeast-1.compute.internal
172.31.15.60 ip-172-31-15-60.ap-southeast-1.compute.internal
172.31.8.194 ip-172-31-8-194.ap-southeast-1.compute.internal
172.31.13.81 ip-172-31-13-81.ap-southeast-1.compute.internal
以上两步操作,在集群中其它节点做相同配置。确认CM的hosts文件已经同步到集群所有节点:
2.2 禁用SELinux
在所有节点执行setenforce 0 命令,此处使用批处理shell执行:
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "setenforce 0"
集群所有节点修改/etc/selinux/config文件如下:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
2.3 关闭防火墙
集群所有节点执行 systemctl stop命令,此处通过shell批量执行命令如下:
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "systemctl stop firewalld"
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "systemctl disable firewalld"
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "systemctl status firewalld"
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-yZZHevGY-1575117488546)(https://ask.qcloudimg.com/http-save/yehe-1522219/6y0y492vou.jpeg)]
2.4 集群时钟同步
在Redhat7.x的操作系统上,已经默认的安装了chrony,我们这里先卸载chrony,然后安装ntp。使用ntp来配置各台机器的时钟同步,将cm(172.31.2.24)服务作为本地ntp服务器,其它3台服务器与其保持同步。
1.所有机器卸载chrony
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "yum -y remove chrony"
2.所有机器安装ntp
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "yum -y install ntp"
3.cm机器配置时钟与自己同步
[root@ ip-172-31-2-24 shell]# vim /etc/ntp.conf
#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
4.集群其它节点,配置找cm机器去同步
[root@ip-172-31-11-232 ~]# vim /etc/ntp.conf
#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst
server 172.31.2.24
5.重启所有机器的ntp服务
[root@ ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "systemctl restart ntpd"
[root@ ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "systemctl enable ntpd"
[root@ ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "systemctl status ntpd"
6.验证始终同步,在所有节点执行ntpq -p命令,如下使用脚本批量执行
[root@ip-172-31-2-24 shell]# sh ssh_do_all.sh node.list "ntpq -p"
左边出现*号表示同步成功。
2.5 设置swap
1.在所有机器执行以下命令以临时设置swap为1,并即时生效
sh ssh_do_all.sh node.list