首页 > 其他分享 >CDH安装前置准备

CDH安装前置准备

时间:2023-01-05 16:01:59浏览次数:64  
标签:root 31 前置 CDH 148 64 ip 安装 172

温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看。


1.文档编写目的




每次安装CDH集群时都需要做很多前置条件准备,以确保安装成功以及运行主机检查时能顺利通过。本篇文章主要讲述安装Cloudera Manager和CDH前的准备工作。Fayson将这一部分独立出来,主要是为了方面后面再讲安装相关的文章时不用重复这部分内容。


  • 内容概述

1.环境前置确认

2.CDH安装前配置


  • 测试环境

1.CentOS6.5

2.使用root用户操作


  • 测试环境

1.操作系统CentOS6.5


2.环境前置确认

2.1节点数量




最小规模,建议最少4台服务器,一台用作管理节点Cloudera Manager和NameNode等,另外三台用作工作节点,该规模仅用于开发和测试。如果是生产系统,最少6台,3台管理节点包括1个Cloudera Manager,2个NameNode启用高可用,3个工作节点。常见的较小规模的生产系统一般为10-20台。


2.2操作系统选择




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。参考:

​https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html#concept_bhn_wwg_lbb​


2.3安装用户




可以使用root用户安装,或者具有sudu权限的其他用户。


2.4OS目录要求




一般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


2.5硬件要求




以下Cloudera Manager,NameNode和DataNode相同:


CPU:最少4 cores,推荐2路8核,2路10核,2路12核

内存:最小16GB,推荐128GB-256GB

网络:最小千兆,推荐两张万兆绑定

磁盘:OS参考2.3章节,DataNode数据盘推荐12块1TB-4TB的SATA/SAS盘


2.6磁盘要求




1.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


2.DataNode数据盘建议选择ext4或xfs,并配置noatime,比如:

[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

注意:noatime隐含了nodiratime


3.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).


4.确保BIOS配置正确,比如你如果使用的是SATA,请确保没有开启IDE emulation。


5.确保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'


6.目前常见的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


7.确保磁盘没有坏的扇区:

[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


2.7网络要求




1.确保没有启用IPv6

[root@ip-172-31-6-148~]# lsmod | grep ipv6 (todisable add the following to /etc/sysctl.conf)#disable ipv6net.ipv6.conf.all.disable_ipv6= 1net.ipv6.conf.default.disable_ipv6= 1net.ipv6.conf.lo.disable_ipv6= 1

如果是RHEL/CentOS,可以把以下内容补充到/etc/sysconfig/network:

NETWORKING_IPV6=noIPV6INIT=no


2.静态IP

确保所有服务器已配置静态IP,如下:

[root@ip-172-31-6-148~]# cat/etc/sysconfig/network-scripts/ifcfg-eth* (RHEL)

以上文件需包含以下内容:

·     BOOTPROTO=static(RHEL/SLES);

·     iface <iface> inet static

·     IPADDR or address


2.8主机名




确保所有服务器的hostname已经配置,比如cdh1, cdh2, cdh3…

[root@ip-172-31-6-148~]# grep HOSTNAME /etc/sysconfig/network (RHEL)


2.9网卡- Network Interface Cards (NICs)




确保网卡的双工(duplex)模式已开启,并保证速度正常:

[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

可以使用iperf测试服务器两两之间的速度。


2.10JDK




CDH支持JDK包括JDK7以及JDK8。Cloudera提供相应JDK包,并可有CM自动在集群中部署安装。CDH的版本都能提供对Oracle JDK7的支持,而JDK8的支持则需要CDH5.3之后的版本。目前在CDH发行版中自带的JDK版本为1.7.0_67版本。


2.11外部数据库选择




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服务。 确保以下配置:


为了元数据存放相互隔离,部署Cloudera Hadoop集群需要建立以下的数据库,同同时建议为每个数据库建立单独的用户,隔离相互之间的访问。Cloudera提供的组件中需要使用到元数据库的,以及建议的对应命名的规则和用户,如下表中所示。其中实际的数据库和用户名,需要最终进行确认。


角色

database/Schema

User

Password

Cloudera  Manager

cm

cm

********

Reports  Manager

rman

rman

********

Hive Metastore

metastore

hive

********

Sentry Server

sentry

sentry

********

Cloudera  Navigator Audit Server

nav

nav

********

Cloudera Navigator Metadata Server

navms

navms

********

Oozie Server

oozie

oozie

********

Hue Server

hue

hue

********


2.12OS安装包




确保OS的安装包,.iso文件一般为~4GB已经准备并放置在服务器磁盘。


2.13Windows客户端安装机器




  • Windows 7+
  • 谷歌/火狐浏览器
  • SSH工具: putty, secureCRT,Xshell或其他
  • FTP上传工具
  • 可以直接通过ssh访问所有CDH节点
  • 可以直接访问CDH所有节点的所有端口
  • Office软件:Word,Excel等。
  • 文本编辑器:notepad++,editplus,ultraedit等。
  • Windows的用户有权限编辑Windows的hosts文件


2.14端口开放需求




我们在很多情况下操作的Windows客户端机器都是跳板机,没法完全直接访问CDH的服务器,但如果有些服务我们如果不能查看Web UI,没法进行安装或者后期监控集群,比如CM的7180用于安装和运维集群,NN的50070用于监控HDFS等。那么可以联系您的网络管理员开通以下端口:

Service

Port

Hosts

Cloudera Manager

7180

CM所在主机

Cloudera Navigator Metadata

7187

Navigator所在主机

HDFS

50070

Namenode所在主机

HDFS

8020

Namenode所在主机

ResourceManager

8088

RM所在主机

ResourceManager

19888

JobHistory所在主机

HBase

60010

HMaster所在主机

HBase

60030

可选:RegionServer所在主机

Hive

10002

HiveServer2所在主机

Hue

8888

Hue所在主机

Impala

25010

Impala StateStore所在主机

Impala

25020

Impala Catalog所在主机

Impala

25000

所有ImpalaD所在主机

http

80

httpd服务所在机器,一般是CM那台主机

ssh

22

可以通过终端ssh到CM所在机器

Spark

18088

Spark HistoryServer所在机器

更多端口参考:

​https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_ports.html​


3.CDH安装前配置




以下以Redhat6.5为例进行操作。


3.1安装HTTP服务




安装apache的httpd服务主要用于搭建OS、Cloudera Manager、CDH的yum源。在集群服务器中选择一台服务器来安装httpd服务,命令如下:


1.安装httpd服务

[root@ip-172-31-6-148~]# yum -y install httpd


2.将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 startStarting httpd: [root@ip-172-31-6-148~]#

CDH安装前置准备_数据库


3.检查服务是否启动成功

CDH安装前置准备_服务器_02

在浏览器输入http://hostname看到如上截图则说明启动成功。


3.2配置操作系统yum源




1.首先将操作系统的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 -hFilesystem                           Size  UsedAvail Use% Mounted on/dev/xvde                             99G  30G   64G  32% /tmpfs                                7.4G     7.4G   0%/dev/shmcm_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~]# 

CDH安装前置准备_服务器_03


2.在/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

CDH安装前置准备_服务器_04


3.在浏览器访问http://hostname/centos6.5

CDH安装前置准备_数据库_05


4.在/etc/yum.repo.d/目录下增加os.repo文件,内容如下

[[email protected]]# pwd/etc/yum.repos.d
[root@ip-172-31-6-148 yum.repos.d]#vim os.repo [localrepo]name=CentOS6.5baseurl=http://ip-172-31-6-148.fayson.com/centos6.5gpgcheck=falseenabled=true

CDH安装前置准备_服务器_06


5.执行命令查看yum源是否配置成功

[[email protected]]# yum clean all[[email protected]]# yum repolistrepo id                                   reponame                                                 statusbase                                      CentOS-6 - Base                                           6,706extras                                    CentOS-6- Extras                                             46localrepo                                 CentOS6.5                                                   248updates                                   CentOS-6 - Updates                                           722repolist: 7,736[[email protected]]#

CDH安装前置准备_数据库_07

注:需要将os.repo文件同步至集群所有服务器的/etc/yum.repo.d目录。


3.3HOSTS配置




1.hostname修改

修改配置文件/etc/sysconfig/network

[root@ip-172-31-6-148~]# vim /etc/sysconfig/networkNETWORKING=yesNETWORKING_IPV6=noHOSTNAME=ip-172-31-6-148.fayson.com

CDH安装前置准备_数据库_08

修改完成后需要重启服务器使其生效。修改集群所有节点的hostname为统一格式方便集群管理。


2.配置/etc/hosts文件

[root@ip-172-31-6-148~]# vim /etc/hosts127.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

CDH安装前置准备_数据库_09

将集群所有服务器的IP和HOSTNAME配置到hosts文件,并同步至集群的所有服务器。如果企业有自己的DNS服务则可以使用DNS服务统一管理集群IP和域名,也可以自己搭建私有DNS服务管理CDH集群服务器的IP和域名,可以参考​​如何利用Dnsmasq构建小型集群的本地DNS服务器​​​和​​如何在Windows Server2008搭建DNS服务并配置泛域名解析​​。

注意:如果使用hosts文件管理集群的IP和HOSTNAME则需要确保将hosts文件同步至集群所有节点。



3.4禁用SELinux




​1.在集群所有节点执行如下命令

[root@ip-172-31-6-148~]# setenforce 0


2.修改集群所有节点配置文件/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

CDH安装前置准备_centos_10


3.验证是否禁用成功

[root@ip-172-31-6-148~]# sestatus -vSELinux status:                 disabled[root@ip-172-31-6-148~]# 

CDH安装前置准备_数据库_11


3.5关闭防火墙



1.关闭集群所有服务器的防火墙

[root@ip-172-31-6-148~]# chkconfig iptables off

[root@ip-172-31-6-148~]# service iptables stopiptables: Setting chains to policy ACCEPT: filter          OK  ]iptables: Flushing firewall rules:                         OK  ]iptables: Unloading modules:                               OK  ][root@ip-172-31-6-148 ~]# 

CDH安装前置准备_服务器_12


2.检查集群所有服务器防火墙是否关闭

[root@ip-172-31-6-148~]# service iptables statusiptables: Firewall is not running.[root@ip-172-31-6-148~]# 

CDH安装前置准备_centos_13


3.6设置SWAP




1.在集群所有节点修改/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 pageskernel.shmall = 4294967296vm.swappiness = 10

CDH安装前置准备_服务器_14


2.检查设置是否生效

[root@ip-172-31-6-148~]# sysctl -p…
kernel.msgmnb= 65536kernel.msgmax= 65536kernel.shmmax= 68719476736kernel.shmall= 4294967296vm.swappiness= 10[root@ip-172-31-6-148~]# 

CDH安装前置准备_centos_15


3.7关闭透明大页面




1.在集群所有节点执行如下命令,使其立即生效

[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


2.在集群所有节点/etc/rc.d/rc.local脚本中增加如下代码,使其永久生效

if test -f/sys/kernel/mm/redhat_transparent_hugepage/enabled; then
  
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabledfi
if
test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then
  
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defragfi


3.赋予rc.local脚本可执行权限

[root@ip-172-31-6-148rc.d]# chmod +x /etc/rc.d/rc.local


3.8配置时钟同步



如果企业有自己的NTP Server则可以集群中所有节点可配置企业NTP Server,如果没有自己的NTP服务器则在集群中选用一台服务器作为NTP Server,其它服务器与其保持同步,配置如下:


1.在集群所有节点安装NTP服务

[root@ip-172-31-6-148~]# yum -y install ntp


2.选择集群一台服务器作为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 iburstserver  127.127.1.0     #local clockfudge   127.127.1.0 stratum 10

CDH安装前置准备_服务器_16


3.集群其它节点与其同步,配置如下:

[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 iburstserver 172.31.6.148

CDH安装前置准备_centos_17


4.完成以上配置后,在集群所有节点执行如下命令

[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 restartShutting down ntpd:                                        OK  ]Starting ntpd:                                             OK  ][root@ip-172-31-6-148~]# 

CDH安装前置准备_服务器_18


5.验证所有节点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 448 1024  377    0.255   3.245   7.859[root@ip-172-31-5-190~]# 

CDH安装前置准备_数据库_19

注:上图标注看到有*号则表示同步成功。


3.9安装MySQL数据库




1.在集群中CM节点安装MySQL服务

[[email protected]]# yum -y install mysql mysql-server

CDH安装前置准备_centos_20


2.启动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 startStarting mysqld:                                           OK  ][root@ip-172-31-6-148 ~]# 

CDH安装前置准备_centos_21


3.执行如下脚本初始化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, andyou 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]
yNew 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 MySQLinstallationshould now be secure.
Thanks for usingMySQL!
[root@ip-172-31-9-33~]# 


4.登录MySQL验证是否安装成功

[root@ip-172-31-9-33~]# mysql -uroot -pEnter password: Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 9Server 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 itsaffiliates.Other names may be trademarks of theirrespectiveowners.

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

mysql> 

CDH安装前置准备_数据库_22


5.创建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;

CDH安装前置准备_数据库_23


3.10配置CM的yum源




1.在/var/www/html下新增cm5.13目录

[root@ip-172-31-6-148html]# mkdir -p /var/www/html/cm5.13


2.下载CM5.13版本的RPM安装包

​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

将上述7个地址下载到/var/www/html/cm5.13目录下


CDH安装前置准备_数据库_24


3.在/var/www/html/cm5.13目录下执行命令

[root@ip-172-31-6-148cm5.13]# createrepo .Spawning worker 0 with 7pkgsWorkers FinishedGathering worker results
Saving Primary metadataSaving file lists metadataSaving other metadataGenerating sqlite DBsSqlite DBs complete[root@ip-172-31-6-148 cm5.13]# ll

CDH安装前置准备_服务器_25


4.验证CM是否部署成功

CDH安装前置准备_服务器_26


5.在Cloudera Manager所在服务器的/etc/yum.repo.d目录下创建cm.repo文件,内容如下

[[email protected]]# vim cm.repo[cmrepo]name=Cloudera Manager 5.13baseurl=http://ip-172-31-6-148.fayson.com/cm5.13gpgcheck=falseenable=true

CDH安装前置准备_centos_27


6.验证CM的yum源是否配置成功

[[email protected]]# yum repolist...
repo id                                     reponame                                               statusbase                                        CentOS-6 - Base                                          6,706cmrepo                                      Cloudera Manager 5.13                                        7extras                                      CentOS-6 - Extras                                           46localrepo                                   CentOS6.5                                                 248updates                                     CentOS-6 - Updates                                         722repolist: 7,729[[email protected]]# 

CDH安装前置准备_centos_28


3.11部署CDH的Parcel




1.在/var/www/html目录下创建cdh5.13目录

[root@ip-172-31-6-148html]# mkdir -p /var/www/html/cdh5.13


2.下载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

CDH安装前置准备_数据库_29


3.验证是否部署成功

CDH安装前置准备_服务器_30


3.12安装MySQL驱动




在集群中需要安装CM服务的节点上安装MySQL的驱动


1.创建目录/usr/share/java,有则不用创建。

[root@ip-172-31-6-148java]# mkdir -p /usr/share/java/


2.将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]#lltotal 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]# lltotal 940-rwxr-xr-x.1 root root 960372 Aug 3015:16 mysql-connector-java-5.1.34.jarlrwxrwxrwx  1root root     31 Oct 15 18:00 mysql-connector-java.jar ->mysql-connector-java-5.1.34.jar[root@ip-172-31-6-148java]#

CDH安装前置准备_centos_31



为天地立心,为生民立命,为往圣继绝学,为万世开太平。

温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看。



推荐关注Hadoop实操,第一时间,分享更多Hadoop干货,欢迎转发和分享。

CDH安装前置准备_centos_32



标签:root,31,前置,CDH,148,64,ip,安装,172
From: https://blog.51cto.com/u_14049791/5991367

相关文章

  • 从入门到精通 - Fayson带你玩转CDH
    温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。Fayson的github:​​https://github.com/fayson/cdhproject​​提示:代码块部分可......
  • Apache Tomcat的安装与测试
    为了unity的webgl发布和测试,我安装了tomcat。距离上一次使用Tomcat还是很久很久以前的事情了。简单记录一下吧。我发现webgl的发布问题超级多,尤其是2020版本的。看来接下来......
  • 【AGC】在云调试删除应用无法再安装问题
    问题背景:俄罗斯cp反馈在AGC平台使用云调试功能出现了问题。复现步骤:安装应用程序->卸载应用程序(长按“删除”按钮)->再次尝试安装。之后收到信息:安装成功。但无论如何......
  • 【AGC】在云调试删除应用无法再安装问题
    问题背景:俄罗斯cp反馈在AGC平台使用云调试功能出现了问题。复现步骤:安装应用程序->卸载应用程序(长按“删除”按钮)->再次尝试安装。之后收到信息:安装成功。但无论如何,已......
  • 鹏业安装算量软件模型标签删除方法
    鹏业安装算量软件一键生成的模型标签可以删除吗?标签有什么用?答:鹏业安装算量软件通过一键识别喷淋、消火栓、给排水、桥架、通风等专业的时候,会在所选图纸范围的右上角形成一......
  • 安装算量软件安装流程详解
    安装算量软件安装流程1.以管理员身份运行安装包2.点击安装(注:如此时杀毒软件提示阻止,一律点允许)3.按如图所示点击下一步4.软件安装路劲建议不要装C盘,把路径改为D盘或其他......
  • Centos7系统中mongodb的安装详解
    MongoDB的下载网址1.下载完成后上传解压并重命名为mongodb2.在mongodb目录下创建data、logs目录[root@kht118mongodb]#mkdirdatalogs3.创建logs/mongodb.log文......
  • Amber22 安装过程miniconda报错处理
    最近在安装amber22时,使用其官方说明安装,但在安装miniconda这一步出错,致使amber22安装不成功!报错如下:CondaFileIOError:'/home/lbm/amber22/amber22_src/build/CMakeFi......
  • Centos Linux 离线安装 MySQL 5.7
    1、下载  https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz2、创建mysql属组、用户、安装目录#创建新数组mysql......
  • 算法之SPFA的前置:Bellman-Ford算法
    SPFA我们都知道一个叫SPFA的算法,它是用来计算单源最短路径的,但是,众所周知它不是很稳定,容易退化。SPFA是基于什么被提出的?基于一个叫做Bellman-Ford的算法。Bellman-For......