Cloudera Hadoop-基于二进制方式安装包方式部署Cloudera Manager(离线安装)

      Cloudera Hadoop-基于二进制方式安装包方式部署Cloudera Manager(离线安装)

                                            作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

一.下载CDH和CM

1>.CDH的选择

下载地址:http://archive.cloudera.com/cdh5/parcels/5.15.1/

  el5表示RedHat 5/CentOS 5 发行版本应用软件。
  el6表示RedHat 6/CentOS 6 发行版本应用软件。
  jessie表示Debian 8的发行版本之一。
  precise表示Ubuntu 12的发行版本。
  sles11表示SUSE 11的发行版本。
  sles12表示SUSE 12的发行版版本。
  trusty表示Ubantu 14的发行版本。
  wheezy表示Debian 7的发行版本之一。

2>.CM的选择

 下载地址:http://archive.cloudera.com/cm5/cm/5/

 

二. Cloudera Manager 安装

1>.将下载的Cloudera Manager分发到各个节点

[root@node101.yinzhengjie.org.cn ~]# ll
total 2889720
-rw-r--r-- 1 root root 2120090032 Jan  8 17:10 CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel
-rw-r--r-- 1 root root         41 Jan  8 14:54 CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel.sha1
-rw-r--r-- 1 root root  838894986 Jan  8 15:11 cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz
-rw-r--r-- 1 root root      73767 Jan  8 14:54 manifest.json
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# scp cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz node102.yinzhengjie.org.cn:~
cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz                                                                                                                                  100%  800MB 129.9MB/s   00:06    
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# scp cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz node103.yinzhengjie.org.cn:~
cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz                                                                                                                                  100%  800MB 133.3MB/s   00:06    
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# scp cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz node104.yinzhengjie.org.cn:~
cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz                                                                                                                                  100%  800MB 135.2MB/s   00:05    
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# scp cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz node105.yinzhengjie.org.cn:~
cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz                                                                                                                                  100%  800MB 133.6MB/s   00:05    
[root@node101.yinzhengjie.org.cn ~]#

2>.创建解压CM默认解压的目录,如果你想要使用别的解压目录别忘了修改配置文件哟

[root@node101.yinzhengjie.org.cn ~]# tail -2 /etc/ansible/hosts         #编辑ansible的配置文件
[cdh]
node[101:105].yinzhengjie.org.cn
[root@node101.yinzhengjie.org.cn ~]#  
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'mkdir /opt/cloudera-manager'
 [WARNING]: Consider using file module with state=directory rather than running mkdir

node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>


[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'mkdir /opt/cloudera-manager'

3>.将CM解压到我们刚刚创建的目录中

[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'tar -zxf /root/cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz -C /opt/cloudera-manager/'
 [WARNING]: Consider using unarchive module rather than running tar

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>


[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'tar -zxf /root/cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz -C /opt/cloudera-manager/'
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'ls -l /opt/cloudera-manager/'
node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>
total 0
drwxr-xr-x 4 1106 4001 36 Jul 31  2018 cloudera
drwxr-xr-x 9 1106 4001 88 Jul 31  2018 cm-5.15.1

node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>
total 0
drwxr-xr-x 4 1106 4001 36 Jul 31  2018 cloudera
drwxr-xr-x 9 1106 4001 88 Jul 31  2018 cm-5.15.1

node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>
total 0
drwxr-xr-x 4 1106 4001 36 Jul 31  2018 cloudera
drwxr-xr-x 9 1106 4001 88 Jul 31  2018 cm-5.15.1

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>
total 0
drwxr-xr-x 4 1106 4001 36 Jul 31  2018 cloudera
drwxr-xr-x 9 1106 4001 88 Jul 31  2018 cm-5.15.1

node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>
total 0
drwxr-xr-x 4 1106 4001 36 Jul 31  2018 cloudera
drwxr-xr-x 9 1106 4001 88 Jul 31  2018 cm-5.15.1

[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'ls -l /opt/cloudera-manager/'

4>.在所有的节点上创建clodera-scm用户

[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'useradd --system --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm'
node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>


[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'useradd --system --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm'
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'id cloudera-scm'
node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>
uid=998(cloudera-scm) gid=996(cloudera-scm) groups=996(cloudera-scm)

node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>
uid=998(cloudera-scm) gid=996(cloudera-scm) groups=996(cloudera-scm)

node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>
uid=998(cloudera-scm) gid=996(cloudera-scm) groups=996(cloudera-scm)

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>
uid=998(cloudera-scm) gid=996(cloudera-scm) groups=996(cloudera-scm)

node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>
uid=998(cloudera-scm) gid=996(cloudera-scm) groups=996(cloudera-scm)

[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'id cloudera-scm'

  如果某个agent节点没有创建用户和组的操作,我们在安装服务时可能会出现如下提示:

5>.修改Cloudera Manager Agent端的配置文件

[root@node101.yinzhengjie.org.cn ~]# grep server_port /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-agent/config.ini            #注意,server_port 是Server和Agent的通信端口,没事别瞎改啊!
server_port=7182
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# grep server_host /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-agent/config.ini                #CM服务器默认是本机
server_host=localhost
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'sed -i 's/server_host=localhost/server_host=node101.yinzhengjie.org.cn/g' /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-agent/config.ini'
 [WARNING]: Consider using template or lineinfile module rather than running sed

node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>


[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'sed -i 's/server_host=localhost/server_host=node101.yinzhengjie.org.cn/g' /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-agent/config.ini' #各节点指定CMS地址
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'grep server_host /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-agent/config.ini'    #cdh集群的所有CM agent均指向了同一个CM Server服务器
node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>
server_host=node101.yinzhengjie.org.cn

node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>
server_host=node101.yinzhengjie.org.cn

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>
server_host=node101.yinzhengjie.org.cn

node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>
server_host=node101.yinzhengjie.org.cn

node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>
server_host=node101.yinzhengjie.org.cn

[root@node101.yinzhengjie.org.cn ~]#

6>.初始化CM Server数据库(https://www.cloudera.com/documentation/enterprise/5-16-x/topics/prepare_cm_database.html#scm_prepare_syntax)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'cdh'@'172.30.1.10%' IDENTIFIED BY 'yinzhengjie' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'cdh'@'172.30.1.10%' IDENTIFIED BY 'yinzhengjie' WITH GRANT OPTION;
[root@node101.yinzhengjie.org.cn ~]# cd /opt/cloudera-manager/cm-5.15.1/share/cmf/schema/
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/share/cmf/schema]# 
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/share/cmf/schema]# ./scm_prepare_database.sh mysql cdh -h node106.yinzhengjie.org.cn -ucdh -pyinzhengjie --scm-host node101.yinzhengjie.org.cn scm scm scm           #其格式为:数据库类型,数据库,数据库服务器,用户名,密码,CM服务器,后面的三个scm请不要改动!
JAVA_HOME=/usr/java/jdk1.8
Verifying that we can write to /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-server
Mon Jun 10 21:27:10 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Creating SCM configuration file in /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-server
Executing:  /usr/java/jdk1.8/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/opt/cloudera-manager/cm-5.15.1/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
Mon Jun 10 21:27:11 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2019-06-10 21:27:11,103 [main] INFO  com.cloudera.enterprise.dbutil.DbCommandExecutor  - Successfully connected to database.      #如果看到这个Sucessfully说明你配置成功啦
All done, your SCM database is configured correctly!
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/share/cmf/schema]# 
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/share/cmf/schema]#
[root@node107.yinzhengjie.org.cn ~]# mysql -uroot -pyinzhengjie
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.25-log MySQL Community Server (GPL)

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

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cdh                |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
rows in set (0.00 sec)

mysql> use cdh
Database changed
mysql> 
mysql> show tables;
Empty set (0.00 sec)

mysql> quit
Bye
You have mail in /var/spool/mail/root
[root@node107.yinzhengjie.org.cn ~]# 
[root@node107.yinzhengjie.org.cn ~]# mysql -uroot -pyinzhengjie          #登陆从库查看,发现仅仅创建出cdh这个数据库了,而且这个数据库是空的!

 

三.制作CDH本地源

1>. server创建parcel-repo目录

[root@node101.yinzhengjie.org.cn ~]# mkdir -p /opt/cloudera/parcel-repo                    #Server端创建Parcel-repo目录,用于存放离线CDH文件
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# chown cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo/    #别忘记把权限给赋给我们之前创建的cloudera-scm用户
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ll -d  /opt/cloudera/parcel-repo/
drwxr-xr-x 2 cloudera-scm cloudera-scm 6 Jun 10 21:33 /opt/cloudera/parcel-repo/
[root@node101.yinzhengjie.org.cn ~]#

2>. agent端创建parcels目录

[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'mkdir -p /opt/cloudera/parcels'
 [WARNING]: Consider using file module with state=directory rather than running mkdir

node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>


[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'mkdir -p /opt/cloudera/parcels'
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'chown cloudera-scm:cloudera-scm /opt/cloudera/parcels'
 [WARNING]: Consider using file module with owner rather than running chown

node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>


node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>


[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'chown cloudera-scm:cloudera-scm /opt/cloudera/parcels'
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a 'ls -ld /opt/cloudera/parcels'
node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>
drwxr-xr-x 2 cloudera-scm cloudera-scm 6 Jun 10 21:37 /opt/cloudera/parcels

node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>
drwxr-xr-x 2 cloudera-scm cloudera-scm 6 Jun 10 21:37 /opt/cloudera/parcels

node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>
drwxr-xr-x 2 cloudera-scm cloudera-scm 6 Jun 10 21:37 /opt/cloudera/parcels

node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>
drwxr-xr-x 2 cloudera-scm cloudera-scm 6 Jun 10 21:37 /opt/cloudera/parcels

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>
drwxr-xr-x 2 cloudera-scm cloudera-scm 6 Jun 10 21:37 /opt/cloudera/parcels

[root@node101.yinzhengjie.org.cn ~]#

3>.制作CDH本地源

[root@node101.yinzhengjie.org.cn ~]# ll
total 2889720
-rw-r--r-- 1 root root 2120090032 Jan  8 17:10 CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel
-rw-r--r-- 1 root root         41 Jan  8 14:54 CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel.sha1
-rw-r--r-- 1 root root  838894986 Jan  8 15:11 cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz
-rw-r--r-- 1 root root      73767 Jan  8 14:54 manifest.json
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# mv CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel /opt/cloudera/parcel-repo/
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# mv manifest.json /opt/cloudera/parcel-repo/             #别小瞧这个文件,尽管它不是很大,但是它却记录着CDH和Hadoop生态圈组件的版本依赖关系!   
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# mv CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel.sha1 /opt/cloudera/parcel-repo/CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel.sha      #注意,我在拷贝到时候重命名该文件了!
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ll 
total 819236
-rw-r--r-- 1 root root 838894986 Jan  8 15:11 cloudera-manager-centos7-cm5.15.1_x86_64.tar.gz
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ll /opt/cloudera/parcel-repo/
total 2070484
-rw-r--r-- 1 root root 2120090032 Jan  8 17:10 CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel
-rw-r--r-- 1 root root         41 Jan  8 14:54 CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel.sha
-rw-r--r-- 1 root root      73767 Jan  8 14:54 manifest.json
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# 


温馨提示:
        如果你没有下载到“CDH-5.4.0-1.cdh5.4.0.p0.27-el6.parcel.sha”文件是,可以找到“manifest.json”文件中"parcelName": "CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel"对应的"hash": "deff00898e410a34cf0a1e66c5dbe87546608f0c"复制到该文件即可。这个方法也适用于其他的版本!

 

四.启动CM的Server,Agent端

1>.启动Cloudera Manager Server端

[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# cd /opt/cloudera-manager/cm-5.15.1/etc/init.d/
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]# 
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]# ll
total 32
-rwxr-xr-x 1 1106 4001 8871 Jul 31  2018 cloudera-scm-agent
-rwxr-xr-x 1 1106 4001 8417 Jul 31  2018 cloudera-scm-server
-rwxr-xr-x 1 1106 4001 4444 Jul 31  2018 cloudera-scm-server-db
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]# 
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]# ./cloudera-scm-server start
Starting cloudera-scm-server:                              [  OK  ]
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]# 
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]# ./cloudera-scm-server status
cloudera-scm-server (pid  11666) is running...
[root@node101.yinzhengjie.org.cn /opt/cloudera-manager/cm-5.15.1/etc/init.d]#

2>.我们需要观察Server的日志文件(tail -f /opt/cloudera-manager/cm-5.15.1/log/cloudera-scm-server/cloudera-scm-server.log),如果出现以下内容说明启动成功

3>.启动Cloudera Manager Agent端

[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a '/opt/cloudera-manager/cm-5.15.1/etc/init.d/cloudera-scm-agent start'
node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>
Starting cloudera-scm-agent: [  OK  ]

node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>
Starting cloudera-scm-agent: [  OK  ]

node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>
Starting cloudera-scm-agent: [  OK  ]

node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>
Starting cloudera-scm-agent: [  OK  ]

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>
Starting cloudera-scm-agent: [  OK  ]

[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a '/opt/cloudera-manager/cm-5.15.1/etc/init.d/cloudera-scm-agent start'
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a '/opt/cloudera-manager/cm-5.15.1/etc/init.d/cloudera-scm-agent status'
node102.yinzhengjie.org.cn | SUCCESS | rc=0 >>
cloudera-scm-agent (pid  11859) is running...

node104.yinzhengjie.org.cn | SUCCESS | rc=0 >>
cloudera-scm-agent (pid  11524) is running...

node105.yinzhengjie.org.cn | SUCCESS | rc=0 >>
cloudera-scm-agent (pid  11864) is running...

node103.yinzhengjie.org.cn | SUCCESS | rc=0 >>
cloudera-scm-agent (pid  11865) is running...

node101.yinzhengjie.org.cn | SUCCESS | rc=0 >>
cloudera-scm-agent (pid  12932) is running...

[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# 
[root@node101.yinzhengjie.org.cn ~]# ansible cdh -m shell -a '/opt/cloudera-manager/cm-5.15.1/etc/init.d/cloudera-scm-agent status'

4>.验证是否可以登录成功,访问webUI界面,效果图如下:

  我们安装CM的过程通过WebUI的安装向导来进行安装,推荐使用谷歌浏览器,不要使用容易崩溃的浏览器,这样会影响你安装进度的!如果你也出现了以上界面,恭喜你CM部署成功,

 

 五.基于CM的WebUI部署CDH集群

    详情请参考:https://www.cnblogs.com/yinzhengjie/p/9638360.html

 

六.Cloudera Manager 配置HA简介

    实验环境我们就部署了个单机的Cloudera Mangaer,事实上 CM 也是可以做HA的,详情请参考: https://www.cloudera.com/documentation/enterprise/latest/topics/admin_cm_ha_overview.html。

  想必大家都知道Cloudera Manager独立于CDH而存在,Cloudera Manager挂掉并不会影响CDH集群的工作,只需要及时恢复即可,所以做HA的必要性也不是很大。

 

七.基于yum方式安装(离线安装)

  在某些企业的生产环境部署集群,可能不允许访问公网,这时可选一台主机来架设一个内外镜像。具体操作可参考:https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_create_local_parcel_repo.html。

  官网的这种部署方式,我们课上也有相应的演示。

 

posted @ 2019-06-13 21:15  尹正杰  阅读(877)  评论(0编辑  收藏  举报