35.安装CDH环境准备

  • 测试环境
    • CentOS6.5
    • 使用root用户操作
    • 操作系统CentOS6.5

35.1 环境前置

  • 节点数量
    • 最小规模,建议最少4台服务器,一台用作管理节点Cloudera Manager和NameNode等,另外三台用作工作节点,该规模仅用于开发和测试。
    • 如果是生产系统,最少6台,3台管理节点包括1个Cloudera Manager,2个NameNode启用高可用,3个工作节点。
    • 常见的较小规模的生产系统一般为10-20台。
  • 操作系统选择
    • CDH支持在主流的64位Linux操作系统上部署运行,包括但不限于:
      • Red Hat Enterprise Linux:5.7、5.10、6.4、6.5、6.6、6.7、7.1、7.2
      • CentOS:5.7、5.10、6.4、6.5、6.6、6.7、7.1、7.2
      • SUSE Linux Enterprise Server(SLES):11(SP2、SP3、SP4)
      • Oracle Linux:5.7、5.10、6.4、6.5、6.6、6.7、7.1、7.2
      • Ubuntu:12.04、14.04
      • Debian:7.0、7.1、7.8
    • 目前常见部署选择Redhat6.5或7.2,为安装CDSW安装考虑推荐7.2。
  • 安装用户
    • 可以使用root用户安装,或者具有sudu权限的其他用户。
  • OS目录要求
    • 一般OS磁盘建议raid1或者raid10,对于目录大小,简单点,如果只有一个根目录/建议最少100GB,无论是Cloudera Manger,NameNode还是DataNode节点,因为Cloudera Manager节点往往还存放着MySQL,以及一些监控数据,可以选择200GB。
    • 或者:
      • / 可以默认比如10GB
      • /opt 大于50GB
      • /usr 大于50GB
      • /var 大于20GB
      • /var/log大于50GB
      • /var/lib大于50GB
      • /tmp 大于20GB
    • 或者:
      • / 可以默认比如10GB
      • /opt 大于50GB
      • /usr 大于50GB
      • /var 大于50GB
      • /tmp 大于20GB
  • 硬件要求
    • 以下Cloudera Manager,NameNode和DataNode相同:
      • CPU:最少4 cores,推荐2路8核,2路10核,2路12核
      • 内存:最小16GB,推荐128GB-256GB
      • 网络:最小千兆,推荐两张万兆绑定
      • 磁盘:DataNode数据盘推荐12块1TB-4TB的SATA/SAS盘
  • 磁盘要求
    • DataNode/NodeManager:OS盘可以使用raid1或者raid10,数据盘不要使用raid,应该为JBOD。
      • 管理节点(NameNode,Zookeeper,JournalNode),可以使用raid或者JBOD,因为管理节点对I/O延迟比较敏感,建议将NN,ZK,JN存放数据的目录配置为不同的目录,并且对应到不同的磁盘。
[root@ip-172-31-6-148~]# df –h
[root@ip-172-31-6-148 ~]# lsblk
  • DataNode数据盘建议选择ext4或xfs,并配置noatime,比如:
    • noatime隐含了nodiratime
[root@ip-172-31-6-148~]# cat /etc/fstab
/dev/sda1  /data/1    xfs   defaults,noatime      1 2
/dev/sdb1  /data/2    xfs   defaults,noatime      1 2
/dev/sdc1  /data/3    xfs   defaults,noatime      1 2
/dev/sdd1  /data/4    xfs   defaults,noatime      1 2
/dev/sde1  /data/5    xfs   defaults,noatime      1 2
/dev/sdf1  /data/6    xfs   defaults,noatime      1 2
...
/dev/sdx1  /data/x    xfs    defaults,noatime      1 2

[root@ip-172-31-6-148 ~]# fdisk -l
  • DataNode数据盘确保没有配置分区卷LogicalVolume Manager (LVM)
[root@ip-172-31-6-148~]# df –h
[root@ip-172-31-6-148 ~]# lsblk
[root@ip-172-31-6-148 ~]# lvdisplay

Additionally, look for/dev/mapper or /dev/XX (where XX isnot sd).
  • 确保BIOS配置正确,比如你如果使用的是SATA,请确保没有开启IDE emulation。
  • 确保controller firmware是最新的,校验磁盘是否有一些潜在的问题。
[root@ip-172-31-6-148~]# dmesg | egrep -i 'sense error'
[root@ip-172-31-6-148~]# dmesg | egrep -i 'ata bus error'
  • 目前常见的SATA读写速度大概在150MB/S-180MB/S,SAS或者SSD会更快,如果磁盘读写速度小于70MB/S,肯定是有问题的,需要检查硬件。
    • 以下为测试读写的命令,这里将/data/01挂载到/dev/sda1:
[root@ip-172-31-6-148~]# hdparm –t /dev/sda1
[root@ip-172-31-6-148 ~]# ddbs=1M count=1024 if=/dev/zero of=/data/01 oflag=direct conv=fdatasync
[root@ip-172-31-6-148~]# dd bs=1M count=1024 of=/dev/null if=/data/01 iflag=direct conv=fdatasync
  • 确保磁盘没有坏的扇区:
[root@ip-172-31-6-148~]# badblocks -v /dev/sda1
[root@ip-172-31-6-148~]# badblocks -v /dev/sdb1
...
[root@ip-172-31-6-148 ~]#badblocks -v /dev/sdx1
  • 网络要求
    • 确保没有启用IPv6
[root@ip-172-31-6-148~]# lsmod | grep ipv6
(todisable add the following to /etc/sysctl.conf)

#disable ipv6
net.ipv6.conf.all.disable_ipv6= 1
net.ipv6.conf.default.disable_ipv6= 1
net.ipv6.conf.lo.disable_ipv6= 1
  • 如果是RHEL/CentOS,可以把以下内容补充到/etc/sysconfig/network:
NETWORKING_IPV6=no
IPV6INIT=no
  • 静态IP
    • 确保所有服务器已配置静态IP,如下:
[root@ip-172-31-6-148~]# cat/etc/sysconfig/network-scripts/ifcfg-eth* (RHEL)
  • 以上文件需包含以下内容:
    • BOOTPROTO=static(RHEL/SLES);
    • iface inet static (Ubuntu);
    • IPADDR or address should match the output of ifconfig;
  • 主机名
    • 确保所有服务器的hostname已经配置,比如cdh1, cdh2, cdh3…
[root@ip-172-31-6-148~]# grep HOSTNAME /etc/sysconfig/network (RHEL)
  • 网卡- Network Interface Cards (NICs)
    • 确保网卡的双工(duplex)模式已开启,并保证速度正常:
      • 可以使用iperf测试服务器两两之间的速度。
[root@ip-172-31-6-148~]# ifconfig
[root@ip-172-31-6-148 ~]# ethtool <interface>| grep Speed
[root@ip-172-31-6-148 ~]# ethtool -S <interface> | grep collision
[root@ip-172-31-6-148 ~]# ethtool -S <interface> | grep drop
[root@ip-172-31-6-148 ~]# netperf
  • JDK
    • CDH支持JDK包括JDK7以及JDK8。
      • Cloudera提供相应JDK包,并可有CM自动在集群中部署安装。
      • CDH的版本都能提供对Oracle JDK7的支持,而JDK8的支持则需要CDH5.3之后的版本。
      • 目前在CDH发行版中自带的JDK版本为1.7.0_67版本。
  • 外部数据库选择
    • CM底层自动部署安装数据库进行系统配置、schema等并进行相应管理。
      • 同时CM也支持使用外部数据库作为系统配置、数据表结构等的底层存储,
    • 具体支持的数据库包括:
      • MySQL:5.1、5.5、5.6、5.7
      • PostgreSQL:8.1、8.3、8.4、9.1、9.2、9.3、9.4
      • Oracle:11gR2、12c
    • 一般来说外部元数据库都会采用系统自带的MySQL服务。 确保以下配置:
      • 增加数据库的最大连接数
      • 确保数据库支持UTF-8编码
      • 配置为主备模式
    • 为了元数据存放相互隔离,部署Cloudera Hadoop集群需要建立以下的数据库,同同时建议为每个数据库建立单独的用户,隔离相互之间的访问。
      • Cloudera提供的组件中需要使用到元数据库的,以及建议的对应命名的规则和用户,如下表中所示。其中实际的数据库和用户名,需要最终进行确认。
  • OS安装包
    • 确保OS的安装包,.iso文件一般为~4GB已经准备并放置在服务器磁盘。
  • Windows客户端安装机器
    • Windows 7+
    • 谷歌/火狐浏览器
    • SSH工具: putty, secureCRT,Xshell或其他
    • FTP上传工具
    • 可以直接通过ssh访问所有CDH节点
    • 可以直接访问CDH所有节点的所有端口
    • Office软件:Word,Excel等。
    • 文本编辑器:notepad++,editplus,ultraedit等。
    • Windows的用户有权限编辑Windows的hosts文件
  • 端口开放需求
    • 在很多情况下操作的Windows客户端机器都是跳板机,没法完全直接访问CDH的服务器,但如果有些服务我们如果不能查看Web UI,没法进行安装或者后期监控集群,比如CM的7180用于安装和运维集群,NN的50070用于监控HDFS等。
    • 那么可以联系网络管理员开通以下端口:

35.2 CDH安装前配置

  • 安装HTTP服务
  • 安装apache的httpd服务主要用于搭建OS、Cloudera Manager、CDH的yum源。
  • 在集群服务器中选择一台服务器来安装httpd服务,命令如下:
    • 安装httpd服务
[root@ip-172-31-6-148~]# yum -y install httpd
  • 将httpd服务加入自启动服务并启动
[root@ip-172-31-6-148~]# chkconfig --add httpd
[root@ip-172-31-6-148~]# chkconfig httpd on
[root@ip-172-31-6-148~]# service httpd start
Starting httpd:
[root@ip-172-31-6-148~]#
  • 检查服务是否启动成功
    • 在浏览器输入http://hostname看到截图则说明启动成功。
  • 配置操作系统yum源
    • 首先将操作系统的ISO文件挂载在httpd所在服务器
[root@ip-172-31-6-148~]# mkdir /iso
[root@ip-172-31-6-148~]# mount -o loop CentOS-6.5-x86_64-minimal.iso /iso/
[root@ip-172-31-6-148~]# df -h
Filesystem                           Size  UsedAvail Use% Mounted on
/dev/xvde                             99G  30G   64G  32% /
tmpfs                                7.4G     0  7.4G   0%/dev/shm
cm_processes                         7.4G 9.7M  7.4G   1% /var/run/cloudera-scm-agent/process
/root/CentOS-6.5-x86_64-minimal.iso  398M  398M    0 100% /iso
[root@ip-172-31-6-148~]# 
  • 在/var/www/html目录下创建centos6.5目录,并将/iso目录下所有文件拷贝至/var/www/html/centos6.5目录
[root@ip-172-31-6-148~]# mkdir -p /var/www/html/centos6.5    
[root@ip-172-31-6-148 ~]# scp -r /iso/* /var/www/html/centos6.5/

[root@ip-172-31-6-148~]# cd /var/www/html/centos6.5/
[root@ip-172-31-6-148 centos6.5]# ls
  • 在浏览器访问http://hostname/centos6.5
  • 在/etc/yum.repo.d/目录下增加os.repo文件,内容如下
[root@ip-172-31-6-148yum.repos.d]# pwd
/etc/yum.repos.d
[root@ip-172-31-6-148 yum.repos.d]#vim os.repo
[localrepo]
name=CentOS6.5
baseurl=http://ip-172-31-6-148.fayson.com/centos6.5
gpgcheck=false
enabled=true
  • 执行命令查看yum源是否配置成功
    • 需要将os.repo文件同步至集群所有服务器的/etc/yum.repo.d目录。
[root@ip-172-31-6-148yum.repos.d]# yum clean all
[root@ip-172-31-6-148yum.repos.d]# yum repolist
repo id                                   reponame                                                 status
base                                      CentOS-6 - Base                                           6,706
extras                                    CentOS-6- Extras                                             46
localrepo                                 CentOS6.5                                                   248
updates                                   CentOS-6 - Updates                                           722
repolist: 7,736
[root@ip-172-31-6-148yum.repos.d]#
  • HOSTS配置
    • hostname修改
      • 修改配置文件/etc/sysconfig/network
      • 修改完成后需要重启服务器使其生效。修改集群所有节点的hostname为统一格式方便集群管理。
[root@ip-172-31-6-148~]# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=ip-172-31-6-148.fayson.com
  • 配置/etc/hosts文件
    • 将集群所有服务器的IP和HOSTNAME配置到hosts文件,并同步至集群的所有服务器。
    • 如果企业有自己的DNS服务则可以使用DNS服务统一管理集群IP和域名,也可以自己搭建私有DNS服务管理CDH集群服务器的IP和域名。
    • 如果使用hosts文件管理集群的IP和HOSTNAME则需要确保将hosts文件同步至集群所有节点。
[root@ip-172-31-6-148~]# vim /etc/hosts
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

172.31.6.148  ip-172-31-6-148.fayson.com
172.31.5.190  ip-172-31-5-190.fayson.com
172.31.10.118 ip-172-31-10-118.fayson.com
172.31.9.33   ip-172-31-9-33.fayson.com
  • 禁用SELinux
    • 在集群所有节点执行如下命令
[root@ip-172-31-6-148~]# setenforce 0
  • 修改集群所有节点配置文件/etc/selinux/config
[root@ip-172-31-6-148~]# vim /etc/selinux/config

# This file controls the state ofSELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policyis enforced.
#     permissive - SELinux printswarnings instead of enforcing.
#     disabled - No SELinux policy isloaded.
SELINUX=disabled
# SELINUXTYPE= can take one of thesetwo values:
#     targeted - Targeted processes areprotected,
#     mls - Multi Level Securityprotection.
SELINUXTYPE=targeted
  • 验证是否禁用成功
[root@ip-172-31-6-148~]# sestatus -v
SELinux status:                 disabled
[root@ip-172-31-6-148~]# 
  • 关闭防火墙
    • 关闭集群所有服务器的防火墙
[root@ip-172-31-6-148~]# chkconfig iptables off

[root@ip-172-31-6-148~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
[root@ip-172-31-6-148 ~]# 
  • 检查集群所有服务器防火墙是否关闭
[root@ip-172-31-6-148~]# service iptables status
iptables: Firewall is not running.
[root@ip-172-31-6-148~]# 
  • 设置SWAP
    • 在集群所有节点修改/etc/sysctl.conf配置文件,增加如下配置
[root@ip-172-31-6-148~]# vim /etc/sysctl.conf
# Kernel sysctl configuration filefor Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
…
# Controls the maximum number ofshared memory segments, in pages
kernel.shmall = 4294967296

vm.swappiness = 10
  • 检查设置是否生效
[root@ip-172-31-6-148~]# sysctl -p
…
kernel.msgmnb= 65536
kernel.msgmax= 65536
kernel.shmmax= 68719476736
kernel.shmall= 4294967296
vm.swappiness= 10
[root@ip-172-31-6-148~]# 
  • 关闭透明大页面
    • 在集群所有节点执行如下命令,使其立即生效
[root@ip-172-31-6-148~]# echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
[root@ip-172-31-6-148~]# echo never >/sys/kernel/mm/redhat_transparent_hugepage/enabled
  • 在集群所有节点/etc/rc.d/rc.local脚本中增加如下代码,使其永久生效
if test -f/sys/kernel/mm/redhat_transparent_hugepage/enabled; then
   echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then
   echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
fi
  • 赋予rc.local脚本可执行权限
[root@ip-172-31-6-148rc.d]# chmod +x /etc/rc.d/rc.local
  • 配置时钟同步
  • 如果企业有自己的NTP Server则可以集群中所有节点可配置企业NTP Server,如果没有自己的NTP服务器则在集群中选用一台服务器作为NTP Server,其它服务器与其保持同步,配置如下:
  • 在集群所有节点安装NTP服务
[root@ip-172-31-6-148~]# yum -y install ntp
  • 选择集群一台服务器作为NTP Server,配置如下
[root@ip-172-31-6-148~]# vim /etc/ntp.conf

#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     #local clock
fudge   127.127.1.0 stratum 10
  • 集群其它节点与其同步,配置如下:
[ip-172-31-5-190 ~]# vim /etc/ntp.conf

# Use public servers from thepool.ntp.org project.
#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 172.31.6.148
  • 完成以上配置后,在集群所有节点执行如下命令
[root@ip-172-31-6-148~]# chkconfig --add ntpd
[root@ip-172-31-6-148~]# chkconfig ntpd on
[root@ip-172-31-6-148~]# service ntpd restart
Shutting down ntpd:                                        [  OK  ]
Starting ntpd:                                             [  OK  ]
[root@ip-172-31-6-148~]# 
  • 验证所有节点NTP是否同步
[root@ip-172-31-5-190~]# ntpq -p
     remote           refid      st t when pollreach   delay   offset jitter
==============================================================================
*ip-172-31-6-148210.23.25.77     2 u 448 1024  377    0.255   3.245   7.859
[root@ip-172-31-5-190~]# 
  • 安装MySQL数据库
    • 在集群中CM节点安装MySQL服务
[root@ip-172-31-6-148yum.repos.d]# yum -y install mysql mysql-server
  • 启动MySQL服务并将mysqld加入开机自启动服务
[root@ip-172-31-6-148~]# chkconfig --add mysqld
[root@ip-172-31-6-148 ~]# chkconfig mysqld on
[root@ip-172-31-6-148 ~]# service mysqld start
Starting mysqld:                                           [  OK  ]
[root@ip-172-31-6-148 ~]# 
  • 执行如下脚本初始化MySQL
[root@ip-172-31-9-33~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FORALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READEACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll needthe current
password for the root user.  If you'vejust installed MySQL, and
you haven't set the root password yet, the passwordwill be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing,and to make the installation
go a bit smoother.  You should removethem before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n
 ... skipping.

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only fortesting, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on testdatabase...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installationshould now be secure.

Thanks for usingMySQL!

[root@ip-172-31-9-33~]# 
  • 登录MySQL验证是否安装成功
[root@ip-172-31-9-33~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013,Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporationand/or its
affiliates.Other names may be trademarks of theirrespective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current inputstatement.

mysql> 
  • 创建CDH所需要的数据库
create database metastore default character set utf8;
CREATE USER 'hive'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON metastore.* TO 'hive'@'%';
FLUSH PRIVILEGES;


create database cm default character set utf8;
CREATE USER 'cm'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cm. * TO 'cm'@'%';
FLUSH PRIVILEGES;

create database am default character set utf8;
CREATE USER 'am'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON am. * TO 'am'@'%';
FLUSH PRIVILEGES;

create database rm default character set utf8; 
CREATE USER 'rm'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON rm. * TO 'rm'@'%';
FLUSH PRIVILEGES;

create database hue default character set utf8;
CREATE USER 'hue'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON hue. * TO 'hue'@'%';
FLUSH PRIVILEGES;

create database oozie default character set utf8;
CREATE USER 'oozie'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON oozie. * TO 'oozie'@'%';
FLUSH PRIVILEGES;

create database sentry default character set utf8;
CREATE USER 'sentry'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON sentry.* TO 'sentry'@'%';
FLUSH PRIVILEGES;
  • 配置CM的yum源
    • 在/var/www/html下新增cm5.13目录
[root@ip-172-31-6-148html]# mkdir -p /var/www/html/cm5.13
  • 下载CM5.13版本的RPM安装包
    • 将上述7个地址下载到/var/www/html/cm5.13目录下
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-agent-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-daemons-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-server-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-server-db-2-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/enterprise-debuginfo-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/jdk-6u31-linux-amd64.rpm
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
  • 在/var/www/html/cm5.13目录下执行命令
[root@ip-172-31-6-148cm5.13]# createrepo .
Spawning worker 0 with 7pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@ip-172-31-6-148 cm5.13]# ll
  • 验证CM是否部署成功
  • 在Cloudera Manager所在服务器的/etc/yum.repo.d目录下创建cm.repo文件,内容如下
[root@ip-172-31-6-148yum.repos.d]# vim cm.repo
[cmrepo]
name=Cloudera Manager 5.13
baseurl=http://ip-172-31-6-148.fayson.com/cm5.13
gpgcheck=false
enable=true
  • 验证CM的yum源是否配置成功
[root@ip-172-31-6-148yum.repos.d]# yum repolist
...
repo id                                     reponame                                               status
base                                        CentOS-6 - Base                                          6,706
cmrepo                                      Cloudera Manager 5.13                                        7
extras                                      CentOS-6 - Extras                                           46
localrepo                                   CentOS6.5                                                 248
updates                                     CentOS-6 - Updates                                         722
repolist: 7,729
[root@ip-172-31-6-148yum.repos.d]# 
  • 部署CDH的Parcel
    • 在/var/www/html目录下创建cdh5.13目录
[root@ip-172-31-6-148html]# mkdir -p /var/www/html/cdh5.13
  • 下载CDH5.13版本的Parcel包
http://archive.cloudera.com/cdh5/parcels/5.13/CDH-5.13.0-1.cdh5.13.0.p0.29-el6.parcel
http://archive.cloudera.com/cdh5/parcels/5.13/CDH-5.13.0-1.cdh5.13.0.p0.29-el6.parcel.sha1
http://archive.cloudera.com/cdh5/parcels/5.13/manifest.json
  • 验证是否部署成功
  • 安装MySQL驱动
    • 在集群中需要安装CM服务的节点上安装MySQL的驱动
    • 创建目录/usr/share/java,有则不用创建。
[root@ip-172-31-6-148java]# mkdir -p /usr/share/java/
  • 将mysql-connector-java-5.1.34.jar拷贝至/usr/share/java目录,并创建软链接
[root@ip-172-31-6-148java]# pwd
/usr/share/java
[root@ip-172-31-6-148 java]#ll
total 940
-rwxr-xr-x.1 root root 960372 Aug 3015:16 mysql-connector-java-5.1.34.jar
[root@ip-172-31-6-148java]# ln -s mysql-connector-java-5.1.34.jar mysql-connector-java.jar       
[root@ip-172-31-6-148java]# ll
total 940
-rwxr-xr-x.1 root root 960372 Aug 3015:16 mysql-connector-java-5.1.34.jar
lrwxrwxrwx  1root root     31 Oct 15 18:00 mysql-connector-java.jar ->mysql-connector-java-5.1.34.jar
[root@ip-172-31-6-148java]#

大数据视频推荐:
CSDN
大数据语音推荐:
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值