溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

0024-CENTOS6.5安裝CDH5.12.1(一)

發(fā)布時(shí)間:2020-07-12 00:16:48 來源:網(wǎng)絡(luò) 閱讀:447 作者:Hadoop實(shí)操 欄目:大數(shù)據(jù)

溫馨提示:要看高清無碼套圖,請使用手機(jī)打開并單擊圖片放大查看。

1.概述

本文檔主要描述離線環(huán)境下,CentOS6.5操作系統(tǒng)部署CDH5.12.1企業(yè)版的過程。本安裝文檔主要分為4個(gè)步驟:

1.前期準(zhǔn)備(包括hostname、關(guān)閉防火墻、關(guān)閉SELinux、時(shí)鐘同步等)

2.安裝Cloudera Manager Server

3.安裝CDH集群

4.集群完整性檢查(包括HDFS文件系統(tǒng)、MapReduce、Hive等服務(wù)是否可以正常運(yùn)行)

這篇文檔將著重介紹Cloudera管理器與CDH的安裝,并基于以下假設(shè):

1.操作系統(tǒng)版本:CentOS6.5

2.MySQL版本:5.1.73

3.CM版本:CM 5.12.1

4.CDH版本:CDH 5.12.1

5.采用root對集群進(jìn)行部署

6.您已經(jīng)下載CDH和CM的安裝包(CDH使用parcels包方式安裝)

2.前期準(zhǔn)備

2.1hostname及hosts配置

集群中各個(gè)節(jié)點(diǎn)之間能互相通信使用靜態(tài)IP地址。IP地址和主機(jī)名通過/etc/hosts配置,主機(jī)名/etc/hostname進(jìn)行配置(推薦hostname使用FQDN完全域名的方式配置)。

服務(wù)器172.31.6.148)為例:

  • 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

0024-CENTOS6.5安裝CDH5.12.1(一)

注意:修改hostname后需要重啟服務(wù)器。

檢查hostname是否修改成功:

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

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

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • hosts配置

/etc/hosts文件如下:

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

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

0024-CENTOS6.5安裝CDH5.12.1(一)

以上兩步操作,在集群中其它節(jié)點(diǎn)做相應(yīng)配置。

2.2禁用SELinux

在所有節(jié)點(diǎn)執(zhí)行sudo setenforce 0 命令

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

修改集群所有節(jié)點(diǎn)的/etc/selinux/config文件,內(nèi)容如下:

[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 these twovalues:

targeted - Targeted processes areprotected,

mls - Multi Level Securityprotection.

SELINUXTYPE=targeted

0024-CENTOS6.5安裝CDH5.12.1(一)

2.3關(guān)閉防火墻

在集群所有節(jié)點(diǎn)執(zhí)行如下操作,并永久關(guān)閉防火墻

[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 ~]# chkconfig iptables off

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

0024-CENTOS6.5安裝CDH5.12.1(一)

2.4配置操作系統(tǒng)本地yum源

  • 掛載操作系統(tǒng)iso文件

[root@ip-172-31-6-148~]# mkdir /mnt/iso

[root@ip-172-31-6-148 ~]# mount -o loop CentOS-6.5-x86_64-minimal.iso/mnt/iso/

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

Filesystem Size UsedAvail Use% Mounted on

/dev/xvde 99G 3.4G 91G 4% /

tmpfs 7.4G 0 7.4G 0%/dev/shm

/root/CentOS-6.5-x86_64-minimal.iso 398M 398M 0 100% /mnt/iso

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 配置操作系統(tǒng)repo

[root@ip-172-31-6-148~]# vim /etc/yum.repos.d/os.repo

localrepo

name=CentOS6.5

baseurl=file:///mnt/iso

gpgcheck=false

enabled=true

0024-CENTOS6.5安裝CDH5.12.1(一)

查看yum源列表是否有新建的localrepo

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

Loaded plugins: fastestmirror, presto

Loading mirror speeds from cached hostfile

* base: mirror.0x.sg

* extras: mirror.0x.sg

* updates: mirror.0x.sg

localrepo | 3.6 kB 00:00...

localrepo/primary_db | 492 kB 00:00 ...

repo id reponame status

base CentOS-6 - Base 6,706

cloudera-manager Cloudera Manager, Version 5.12.0 7

cmrepo cm_repo 7

extras CentOS-6 - Extras 45

localrepo CentOS6.5 248

updates CentOS-6 - Updates 589

repolist: 7,602

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

0024-CENTOS6.5安裝CDH5.12.1(一)

2.5安裝http服務(wù)

  • 使用yum安裝http服務(wù)

在集群其中一節(jié)點(diǎn)上安裝http服務(wù),執(zhí)行如下命令:

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

0024-CENTOS6.5安裝CDH5.12.1(一)

如上圖所示則表明安裝成功。

  • 將httpd服務(wù)加入系統(tǒng)自啟動服務(wù)并設(shè)置開機(jī)啟動

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

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

[root@ip-172-31-6-148 ~]# chkconfig --list |grep httpd

httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 啟動http服務(wù)

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

Starting httpd: [ OK ]

0024-CENTOS6.5安裝CDH5.12.1(一)

2.6重做操作系統(tǒng)yum源

在2.5安裝了httpd服務(wù)后,重新制作操作系統(tǒng)的yum源,使用http的方式,操作如下:

  • 在/var/www/html目錄下創(chuàng)建centos6.5目錄

_root@ip-172-31-6-148_html# mkdir centos6.5

[root@ip-172-31-6-148 html]# ll

total 4

drwxr-xr-x 2 rootroot 4096 Sep 4 16:04 centos6.5

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 將/mnt/iso目錄下的所有文件拷貝至/var/www/html/centos6.5目錄下

_root@ip-172-31-6-148_html# scp -r /mnt/iso/*/var/www/html/centos6.5/

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 修改/etc/yum.repo.d/os.repo配置

[root@ip-172-31-6-148~]# vim /etc/yum.repos.d/os.repo

localrepo

name=CentOS6.5

baseurl=http://ip-172-31-6-148.fayson.com/centos6.5

gpgcheck=false

enabled=true

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 檢查yum源是否配置正常

0024-CENTOS6.5安裝CDH5.12.1(一)

將/etc/yum.repo.d/os.repo配置文件同步到集群所有節(jié)點(diǎn)的/etc/yum.repo.d/目錄下

2.7集群時(shí)鐘同步

在集群的所有服務(wù)器上安裝ntp服務(wù),用于集群時(shí)鐘同步,此處選擇ip-172-31-6-148.fayson.com服務(wù)器作為本地NTP服務(wù)器,集群其它節(jié)點(diǎn)與其保持同步,配置如下:

  • 在集群所有節(jié)點(diǎn)安裝ntp服務(wù),命令如下

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

0024-CENTOS6.5安裝CDH5.12.1(一)

如上圖顯示,則說明安裝成功。

  • 將ntpd加入系統(tǒng)自啟動服務(wù)并設(shè)置開機(jī)啟動

在所有節(jié)點(diǎn)執(zhí)行如下操作:

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

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 在ip-172-31-6-148.fayson.com上配置與自己同步

[root@ip-172-31-6-148~]# vim /etc/ntp.conf

...

Use public servers from thepool.ntp.org project.

Please consider joining the pool (http://www.pool.ntp.org/join.html).

#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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 集群其它節(jié)點(diǎn)配置如下

[root@ip-172-31-5-190~]# vim /etc/ntp.conf

...

Use public servers from thepool.ntp.org project.

Please consider joining the pool (http://www.pool.ntp.org/join.html).

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 重啟集群所有節(jié)點(diǎn)的ntpd服務(wù)

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

Shutting down ntpd: [ OK ]

Starting ntpd: [ OK ]

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 驗(yàn)證時(shí)鐘同步,在所有節(jié)點(diǎn)執(zhí)行ntpq -p命令

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

remote refid stt when poll reach delay offset jitter

==============================================================================

*LOCAL(0) .LOCL. 10 l 15 64 7 0.000 0.000 0.001

[root@ip-172-31-6-148 ~]# ssh -i fayson.pem.txtip-172-31-5-190.fayson.com "ntpq-p"

remote refid st t when pollreach delay offset jitter

==============================================================================

*ip-172-31-6-148 LOCAL(0) 11 u 68 128 377 0.274 1.005 0.243

[root@ip-172-31-6-148 ~]# ssh -i fayson.pem.txtip-172-31-10-118.fayson.com "ntpq-p"

remote refid stt when poll reach delay offset jitter

==============================================================================

*ip-172-31-6-148 LOCAL(0) 11 u 75 128 377 0.285 1.214 0.213

[root@ip-172-31-6-148 ~]# ssh -i fayson.pem.txt ip-172-31-9-33.fayson.com"ntpq -p"

remote refid stt when poll reach delay offset jitter

==============================================================================

*ip-172-31-6-148 LOCAL(0) 11 u 1 64 367 0.294 -9.249 1.511

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

0024-CENTOS6.5安裝CDH5.12.1(一)

注:標(biāo)記部分,有“*”顯示則表示同步成功。

2.8安裝MySQL

  • 安裝MySQL

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

0024-CENTOS6.5安裝CDH5.12.1(一)

如上截圖則表示MySQL安裝成功。

  • 將mysqld加入系統(tǒng)自啟動服務(wù)并設(shè)置開機(jī)啟動

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

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

  • 啟動并配置Mysql

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

...

[ OK ]

Starting mysqld: [ OK ]

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 初始化MySQL

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

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTIONUSE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current

password for the root user. If you've just 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 test database...
    ... 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

installation should now be secure.

Thanks for usingMySQL!

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

注意:標(biāo)紅部分為輸入項(xiàng),出現(xiàn)“Thanks for using MySQL!”則表示初始化成功。

  • 創(chuàng)建CM及CDH服務(wù)的數(shù)據(jù)庫

建庫語句:

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;

命令行操作如下:

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

Enter password:

...

mysql> create database metastore default character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'hive'@'%' IDENTIFIEDBY 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON metastore. * TO 'hive'@'%';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> create databasecm default character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'cm'@'%' IDENTIFIEDBY 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON cm. * TO 'cm'@'%';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql_> create database_am default character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'am'@'%' IDENTIFIEDBY 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON am. * TO 'am'@'%';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> create databaserm default character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'rm'@'%' IDENTIFIEDBY 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON rm. * TO 'rm'@'%';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> create databasehue default character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'hue'@'%' IDENTIFIEDBY 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON hue. * TO 'hue'@'%';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> create databaseoozie default character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'oozie'@'%' IDENTIFIEDBY 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON oozie. * TO 'oozie'@'%';

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

mysql>

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 安裝jdbc驅(qū)動

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

[root@ip-172-31-6-148 ~]# mv mysql-connector-java-5.1.34.jar/usr/share/java/

[root@ip-172-31-6-148 ~]# cd /usr/share/java/

[root@ip-172-31-6-148 java]# ln -s mysql-connector-java-5.1.34.jar mysql-connector-java.jar

[root@ip-172-31-6-148 java]# ll

total 940

-rwxr-xr-x. 1 root root 960372 Aug 30 15:16 mysql-connector-java-5.1.34.jar

lrwxrwxrwx 1root root 31 Sep 4 16:32 mysql-connector-java.jar -> mysql-connector-java-5.1.34.jar

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

0024-CENTOS6.5安裝CDH5.12.1(一)

3.Cloudera Manager安裝

3.1配置CM本地repo源

CM5.12.1下載地址:

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/cloudera-manager-agent-5.12.1-1.cm5121.p0.6.el6.x86\_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/cloudera-manager-daemons-5.12.1-1.cm5121.p0.6.el6.x86\_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/cloudera-manager-server-5.12.1-1.cm5121.p0.6.el6.x86\_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/cloudera-manager-server-db-2-5.12.1-1.cm5121.p0.6.el6.x86\_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/enterprise-debuginfo-5.12.1-1.cm5121.p0.6.el6.x86\_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/jdk-6u31-linux-amd64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86\_64/cm/5.12.1/RPMS/x86\_64/oracle-j2sdk1.7-1.7.0+update67-1.x86\_64.rpm

  • 將以上7個(gè)文件下載至服務(wù)器的/var/www/html/cm5.12.1目錄下

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

[root@ip-172-31-6-148 ~]# cd /var/www/html/cm5.12.1/

[root@ip-172-31-6-148 cm5.12.1]# ll

total 942088

-rw-r--r-- 1 rootroot 9676820 Aug 30 14:45cloudera-manager-agent-5.12.1-1.cm5121.p0.6.el6.x86_64.rpm

-rw-r--r-- 1 rootroot 709818804 Aug 30 14:45 cloudera-manager-daemons-5.12.1-1.cm5121.p0.6.el6.x86_64.rpm

-rw-r--r-- 1 rootroot 8692 Aug 30 14:45cloudera-manager-server-5.12.1-1.cm5121.p0.6.el6.x86_64.rpm

-rw-r--r-- 1 rootroot 10600 Aug 30 14:45cloudera-manager-server-db-2-5.12.1-1.cm5121.p0.6.el6.x86_64.rpm

-rw-r--r-- 1 rootroot 31918952 Aug 30 14:45enterprise-debuginfo-5.12.1-1.cm5121.p0.6.el6.x86_64.rpm

-rw-r--r-- 1 rootroot 71204325 Aug 30 14:45jdk-6u31-linux-amd64.rpm

-rw-r--r-- 1 rootroot 142039186 Aug 30 14:45 oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm

[root@ip-172-31-6-148 cm5.12.1]#

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 在/var/www/html/cm5.12.1目錄下執(zhí)行命令

[root@ip-172-31-6-148 cm5.12.1]# pwd

/var/www/html/cm5.12.1

[root@ip-172-31-6-148 cm5.12.1]#createrepo .

Spawning worker 0 with 7 pkgs

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.12.1]#

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 確認(rèn)http是否能正常訪問

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 在/etc/yum.repo.d/目錄下增加cm.repo文件,內(nèi)容如下

[root@ip-172-31-6-148~]# vim /etc/yum.repos.d/cm.repo

cmrepo

name=CM5.12.1

baseurl=http://ip-172-31-6-148.fayson.com/cm5.12.1

gpgcheck=false

enabled=true

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 驗(yàn)證CM源是否配置成功

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

...

cmrepo CM5.12.1 7

localrepo CentOS6.5 248

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 驗(yàn)證安裝JDK

[root@ip-172-31-6-148 ~]#yum -y install oracle-j2sdk1.7-1.7.0+update67-1

3.2配置http訪問CDH Parcel包

CDH5.12.1下載地址:

http://archive.cloudera.com/cdh6/parcels/5.12.1/CDH-5.12.1-1.cdh6.12.1.p0.3-el6.parcel

http://archive.cloudera.com/cdh6/parcels/5.12.1/CDH-5.12.1-1.cdh6.12.1.p0.3-el6.parcel.sha1

http://archive.cloudera.com/cdh6/parcels/5.12.1/manifest.json

  • 將以上3個(gè)文件下載至/var/www/html/cdh6.12.1目錄下

[root@ip-172-31-6-148~]# mkdir -p /var/www/html/cdh6.12.1

[root@ip-172-31-6-148 ~]# cd /var/www/html/cdh6.12.1/

[root@ip-172-31-6-148 cdh6.12.1]# ll

total 1582508

-rw-r--r-- 1 rootroot 1620405492 Aug 30 19:09 CDH-5.12.1-1.cdh6.12.1.p0.3-el6.parcel

-rw-r--r-- 1 rootroot 41 Aug 30 19:09 CDH-5.12.1-1.cdh6.12.1.p0.3-el6.parcel.sha1

-rw-r--r-- 1 rootroot 72312 Aug 30 19:11 manifest.json

[root@ip-172-31-6-148 cdh6.12.1]#

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 確認(rèn)http是否能正常訪問

0024-CENTOS6.5安裝CDH5.12.1(一)

3.3安裝Cloudera Manager Server

  • 通過yum安裝ClouderaManager Server

[root@ip-172-31-6-148~]# yum -y installcloudera-manager-server

0024-CENTOS6.5安裝CDH5.12.1(一)

如上圖所示則表明安裝成功。

  • 初始化CM數(shù)據(jù)庫

[root@ip-172-31-6-148~]#/usr/share/cmf/schema/scm_prepare_database.sh mysql cm cm password

JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera

Verifying that we can write to /etc/cloudera-scm-server

Creating SCM configuration file in /etc/cloudera-scm-server

Executing: /usr/java/jdk1.7.0_67-cloudera/bin/java-cp/usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/schema/../lib/*com.cloudera.enterprise.dbutil.DbCommandExecutor/etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.

[ main] DbCommandExecutor INFO Successfully connected to database.

All done, your SCM database is configured correctly!

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 啟動ClouderaManager Server

[root@ip-172-31-6-148~]# service cloudera-scm-server start

Starting cloudera-scm-server: [ OK ]

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

  • 檢查端口是否監(jiān)聽

[root@ip-172-31-6-148~]# netstat -lnpt | grep 7180

tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN 4056/java

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

0024-CENTOS6.5安裝CDH5.12.1(一)

  • 通過http:// 52.221.194.202:7180/cmf/login訪問CM控制臺

0024-CENTOS6.5安裝CDH5.12.1(一)

4.CDH安裝

4.1CDH集群安裝向?qū)?/strong>

1.admin/admin登錄到CM

2.同意license協(xié)議,點(diǎn)擊繼續(xù)

0024-CENTOS6.5安裝CDH5.12.1(一)

3.選擇60試用,點(diǎn)擊繼續(xù)

0024-CENTOS6.5安裝CDH5.12.1(一)

4.點(diǎn)擊“繼續(xù)”

0024-CENTOS6.5安裝CDH5.12.1(一)

5.輸入主機(jī)ip或者名稱,點(diǎn)擊搜索找到主機(jī)后點(diǎn)擊繼續(xù)

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

6.點(diǎn)擊“繼續(xù)”

0024-CENTOS6.5安裝CDH5.12.1(一)

7.使用parcel選項(xiàng),點(diǎn)擊“更多選項(xiàng)”,點(diǎn)擊“-”刪除其它所有地址,輸入

http:// ip-172-31-6-148.fayson.com/cdh6.12.1/點(diǎn)擊“保存更改”

0024-CENTOS6.5安裝CDH5.12.1(一)

8.選擇自定義存儲庫,輸入cm的http地址

0024-CENTOS6.5安裝CDH5.12.1(一)

9.點(diǎn)擊“繼續(xù)”,進(jìn)入下一步安裝jdk

0024-CENTOS6.5安裝CDH5.12.1(一)

10.點(diǎn)擊“繼續(xù)”,進(jìn)入下一步,默認(rèn)多用戶模式

0024-CENTOS6.5安裝CDH5.12.1(一)

11.點(diǎn)擊“繼續(xù)”,進(jìn)入下一步配置ssh賬號密碼

0024-CENTOS6.5安裝CDH5.12.1(一)

12.點(diǎn)擊“繼續(xù)”,進(jìn)入下一步,安裝Cloudera Manager相關(guān)到各個(gè)節(jié)點(diǎn)

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

13.點(diǎn)擊“繼續(xù)”,進(jìn)入下一步安裝cdh到各個(gè)節(jié)點(diǎn)

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

14.點(diǎn)擊“繼續(xù)”,進(jìn)入下一步主機(jī)檢查,確保所有檢查項(xiàng)均通過

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

點(diǎn)擊完成進(jìn)入服務(wù)安裝向?qū)А?/p>

4.2集群設(shè)置安裝向?qū)?/strong>

1.選擇需要安裝的服務(wù)

此處使用自定義服務(wù),如下圖

0024-CENTOS6.5安裝CDH5.12.1(一)

2.點(diǎn)擊“繼續(xù)”,進(jìn)入集群角色分配

HDFS角色分配:

0024-CENTOS6.5安裝CDH5.12.1(一)

Hive角色分配:

0024-CENTOS6.5安裝CDH5.12.1(一)

Cloudera Manager Service角色分配:

0024-CENTOS6.5安裝CDH5.12.1(一)

Spark角色分配:(Spark on Yarn所以沒有spark的master和worker角色)

0024-CENTOS6.5安裝CDH5.12.1(一)

Yarn角色分配:

0024-CENTOS6.5安裝CDH5.12.1(一)

Zookeeper角色分配:(至少3個(gè)Server)

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

3.角色分配完成點(diǎn)擊“繼續(xù)”,進(jìn)入下一步,測試數(shù)據(jù)庫連接

0024-CENTOS6.5安裝CDH5.12.1(一)

4.測試成功,點(diǎn)擊“繼續(xù)”,進(jìn)入目錄設(shè)置,此處使用默認(rèn)默認(rèn)目錄,根據(jù)實(shí)際情況進(jìn)行目錄修改

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

5.點(diǎn)擊“繼續(xù)”,等待服務(wù)啟動成功

0024-CENTOS6.5安裝CDH5.12.1(一)

0024-CENTOS6.5安裝CDH5.12.1(一)

6.點(diǎn)擊“繼續(xù)”,顯示集群安裝成功

0024-CENTOS6.5安裝CDH5.12.1(一)

7.安裝成功后進(jìn)入home管理界面

0024-CENTOS6.5安裝CDH5.12.1(一)

醉酒鞭名馬,少年多浮夸! 嶺南浣溪沙,嘔吐酒肆下!摯友不肯放,數(shù)據(jù)玩的花!
溫馨提示:要看高清無碼套圖,請使用手機(jī)打開并單擊圖片放大查看。

歡迎關(guān)注Hadoop實(shí)操,第一時(shí)間,分享更多Hadoop干貨,喜歡請關(guān)注分享。

0024-CENTOS6.5安裝CDH5.12.1(一)
原創(chuàng)文章,歡迎轉(zhuǎn)載,轉(zhuǎn)載請注明:轉(zhuǎn)載自微信公眾號Hadoop實(shí)操

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI