前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CDH安装前置准备

CDH安装前置准备

作者头像
Fayson
修改2018-04-01 19:27:03
3.8K1
修改2018-04-01 19:27:03
举报
文章被收录于专栏:Hadoop实操Hadoop实操

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

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

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 (Ubuntu);

· IPADDR or address should match the output of ifconfig;

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 start

Starting httpd:

root@ip-172-31-6-148~#

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

在浏览器输入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 -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~#

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

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

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

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

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#

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

3.3HOSTS配置


1.hostname修改

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

root@ip-172-31-6-148~# vim /etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=ip-172-31-6-148.fayson.com

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

2.配置/etc/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

将集群所有服务器的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

3.验证是否禁用成功

root@ip-172-31-6-148~# sestatus -v

SELinux status: disabled

root@ip-172-31-6-148~#

3.5关闭防火墙


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

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 ~]#

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

root@ip-172-31-6-148~# service iptables status

iptables: Firewall is not running.

root@ip-172-31-6-148~#

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 pages

kernel.shmall = 4294967296

vm.swappiness = 10

2.检查设置是否生效

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~#

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/enabled

fi

if test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then

echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag

fi

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

_root@ip-172-31-6-148_rc.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 iburst

server 127.127.1.0 #local clock

fudge 127.127.1.0 stratum 10

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 iburst

server 172.31.6.148

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 restart

Shutting down ntpd: [ OK ]

Starting ntpd: [ OK ]

root@ip-172-31-6-148~#

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 u 448 1024 377 0.255 3.245 7.859

root@ip-172-31-5-190~#

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

3.9安装MySQL数据库


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

root@ip-172-31-6-148yum.repos.d# yum -y install mysql mysql-server

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 start

Starting mysqld: [ OK ]

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

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, 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~#

4.登录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>

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;

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目录下

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

_root@ip-172-31-6-148_cm5.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

4.验证CM是否部署成功

5.在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

6.验证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#

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

3.验证是否部署成功

3.12安装MySQL驱动


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

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

_root@ip-172-31-6-148_java# 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#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#

为天地立心,为生民立命,为往圣继绝学,为万世开太平。 温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看。


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

原创文章,欢迎转载,转载请注明:转载自微信公众号Hadoop实操

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2017-11-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Hadoop实操 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 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.
  • SELINUXTYPE= can take one of thesetwo values:
  • targeted - Targeted processes areprotected,
  • mls - Multi Level Securityprotection.
  • 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
  • Use public servers from thepool.ntp.org project.
相关产品与服务
云数据库 MySQL
腾讯云数据库 MySQL(TencentDB for MySQL)为用户提供安全可靠,性能卓越、易于维护的企业级云数据库服务。其具备6大企业级特性,包括企业级定制内核、企业级高可用、企业级高可靠、企业级安全、企业级扩展以及企业级智能运维。通过使用腾讯云数据库 MySQL,可实现分钟级别的数据库部署、弹性扩展以及全自动化的运维管理,不仅经济实惠,而且稳定可靠,易于运维。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档