基于YUM部署Cloudera Manager集群扩容实战案例(服役)

          基于YUM部署Cloudera Manager集群扩容实战案例(服役)

                                            作者:尹正杰

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

 

 

 

一.查看数据库名现有节点

[root@node201.yinzhengjie.org.cn ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
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> 
mysql> 
mysql> use scm
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> 
mysql> 
mysql> show tables;
+--------------------------------+
| Tables_in_scm                  |
+--------------------------------+
| AUDITS                         |
| CLIENT_CONFIGS                 |
| CLIENT_CONFIGS_TO_HOSTS        |
| CLUSTERS                       |
| CLUSTERS_AUD                   |
| CLUSTER_ACTIVATED_RELEASES     |
| CLUSTER_ACTIVATED_RELEASES_AUD |
| CLUSTER_MANAGED_RELEASES       |
| CLUSTER_UNDISTRIBUTED_RELEASES |
| CM_PEERS                       |
| CM_VERSION                     |
| COMMANDS                       |
| COMMANDS_DETAIL                |
| COMMAND_SCHEDULES              |
| CONFIGS                        |
| CONFIGS_AUD                    |
| CONFIG_CONTAINERS              |
| CREDENTIALS                    |
| DIAGNOSTICS_EVENTS             |
| EXTERNAL_ACCOUNTS              |
| EXTERNAL_ACCOUNTS_AUD          |
| GLOBAL_SETTINGS                |
| HOSTS                          |
| HOSTS_AUD                      |
| HOST_TEMPLATES                 |
| HOST_TEMPLATE_TO_ROLE_CONF_GRP |
| METRICS                        |
| PARCELS                        |
| PARCEL_COMPONENTS              |
| PROCESSES                      |
| PROCESSES_DETAIL               |
| PROCESS_ACTIVE_RELEASES        |
| RELEASES                       |
| RELEASES_AUD                   |
| REVISIONS                      |
| ROLES                          |
| ROLES_AUD                      |
| ROLE_CONFIG_GROUPS             |
| ROLE_CONFIG_GROUPS_AUD         |
| ROLE_STALENESS_STATUS          |
| SCHEMA_VERSION                 |
| SERVICES                       |
| SERVICES_AUD                   |
| SNAPSHOT_POLICIES              |
| USERS                          |
| USER_ROLES                     |
| USER_SETTINGS                  |
+--------------------------------+
47 rows in set (0.00 sec)

mysql> 
mysql> 
mysql> SELECT * FROM HOSTS;
+---------+-------------------------+--------------------------------------+----------------------------+--------------+----------+--------+---------------------+-------------------+--------------------+------------+-----------+----------------------+-------------+-------------------+----------------+
| HOST_ID | OPTIMISTIC_LOCK_VERSION | HOST_IDENTIFIER                      | NAME                       | IP_ADDRESS   | RACK_ID  | STATUS | CONFIG_CONTAINER_ID | MAINTENANCE_COUNT | DECOMMISSION_COUNT | CLUSTER_ID | NUM_CORES | TOTAL_PHYS_MEM_BYTES | PUBLIC_NAME | PUBLIC_IP_ADDRESS | CLOUD_PROVIDER |
+---------+-------------------------+--------------------------------------+----------------------------+--------------+----------+--------+---------------------+-------------------+--------------------+------------+-----------+----------------------+-------------+-------------------+----------------+
|       1 |                       9 | f12d8ded-5b43-4c67-b6a4-812682ad3a0f | node202.yinzhengjie.org.cn | 172.30.1.202 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           1907970048 | NULL        | NULL              | NULL           |
|       2 |                       9 | ab48a657-8799-4d3f-9a14-958092204861 | node203.yinzhengjie.org.cn | 172.30.1.203 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           3954188288 | NULL        | NULL              | NULL           |
|       3 |                       8 | c5cda983-1a94-4720-bf5d-177308cce46f | node201.yinzhengjie.org.cn | 172.30.1.201 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           8182054912 | NULL        | NULL              | NULL           |
+---------+-------------------------+--------------------------------------+----------------------------+--------------+----------+--------+---------------------+-------------------+--------------------+------------+-----------+----------------------+-------------+-------------------+----------------+
3 rows in set (0.00 sec)

mysql> 
mysql> 

 

二.在需要加入该节点的服务器上启动Cloudera Manager agent

1>.查看yum的配置文件

[root@node204.yinzhengjie.org.cn ~]# cat /etc/yum.repos.d/cloudera-manager.repo 
[cloudera-manager]
name=Cloudera Manager
baseurl=http://node201.yinzhengjie.org.cn/cm-5.16.1/
gpgkey =http://node201.yinzhengjie.org.cn/cm-5.16.1/RPM-GPG-KEY-cloudera
enable = 1
gpgcheck = 1
[root@node204.yinzhengjie.org.cn ~]# 

2>.安装Cloudera Manager Agent端 

[root@node204.yinzhengjie.org.cn ~]# yum -y install  cloudera-manager-agent
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink                                                                                               | 8.1 kB  00:00:00     
 * base: mirrors.aliyun.com
 * epel: mirrors.yun-idc.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                               | 3.6 kB  00:00:00     
cloudera-manager                                                                                                   | 2.9 kB  00:00:00     
epel                                                                                                               | 5.3 kB  00:00:00     
extras                                                                                                             | 3.4 kB  00:00:00     
updates                                                                                                            | 3.4 kB  00:00:00     
(1/5): cloudera-manager/primary_db                                                                                 | 8.3 kB  00:00:00     
(2/5): extras/7/x86_64/primary_db                                                                                  | 205 kB  00:00:00     
(3/5): epel/x86_64/primary_db                                                                                      | 6.8 MB  00:00:03     
(4/5): epel/x86_64/updateinfo                                                                                      | 977 kB  00:00:04     
(5/5): updates/7/x86_64/primary_db                                                                                 | 6.4 MB  00:00:06     
Resolving Dependencies
--> Running transaction check
---> Package cloudera-manager-agent.x86_64 0:5.16.1-1.cm5161.p0.1.el7 will be installed
cloudera-manager/filelists_db                                                                                      |  95 kB  00:00:00     
--> Processing Dependency: cloudera-manager-daemons = 5.16.1 for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
--> Processing Dependency: python-psycopg2 for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
--> Processing Dependency: portmap for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
--> Processing Dependency: openssl-devel for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
updates/7/x86_64/filelists_db                                                                                      | 4.4 MB  00:00:01     
--> Processing Dependency: mod_ssl for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
--> Processing Dependency: httpd for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
--> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64
--> Running transaction check
---> Package MySQL-python.x86_64 0:1.2.5-1.el7 will be installed
---> Package cloudera-manager-daemons.x86_64 0:5.16.1-1.cm5161.p0.1.el7 will be installed
---> Package httpd.x86_64 0:2.4.6-89.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-89.el7.centos for package: httpd-2.4.6-89.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-89.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-89.el7.centos.x86_64
---> Package mod_ssl.x86_64 1:2.4.6-89.el7.centos will be installed
---> Package openssl-devel.x86_64 1:1.0.2k-16.el7_6.1 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-16.el7_6.1 for package: 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64
---> Package python-psycopg2.x86_64 0:2.5.1-3.el7 will be installed
--> Processing Dependency: libpq.so.5()(64bit) for package: python-psycopg2-2.5.1-3.el7.x86_64
---> Package rpcbind.x86_64 0:0.2.0-47.el7 will be installed
--> Processing Dependency: libtirpc >= 0.2.4-0.7 for package: rpcbind-0.2.0-47.el7.x86_64
--> Processing Dependency: libtirpc.so.1()(64bit) for package: rpcbind-0.2.0-47.el7.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-89.el7.centos will be installed
---> Package krb5-devel.x86_64 0:1.15.1-37.el7_6 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-37.el7_6 for package: krb5-devel-1.15.1-37.el7_6.x86_64
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-37.el7_6 for package: krb5-devel-1.15.1-37.el7_6.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-37.el7_6.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-37.el7_6.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-37.el7_6.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-37.el7_6.x86_64
---> Package libtirpc.x86_64 0:0.2.4-0.15.el7 will be installed
---> Package openssl-libs.x86_64 1:1.0.2k-16.el7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-16.el7 for package: 1:openssl-1.0.2k-16.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-16.el7_6.1 will be an update
---> Package postgresql-libs.x86_64 0:9.2.24-1.el7_5 will be installed
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.15.1-34.el7 will be updated
---> Package krb5-libs.x86_64 0:1.15.1-37.el7_6 will be an update
---> Package libcom_err-devel.x86_64 0:1.42.9-13.el7 will be installed
---> Package libkadm5.x86_64 0:1.15.1-37.el7_6 will be installed
---> Package libselinux-devel.x86_64 0:2.5-14.1.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-10 for package: libselinux-devel-2.5-14.1.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-14.1.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5-14.1.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package openssl.x86_64 1:1.0.2k-16.el7 will be updated
---> Package openssl.x86_64 1:1.0.2k-16.el7_6.1 will be an update
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================
 Package                                Arch                 Version                                 Repository                      Size
==========================================================================================================================================
Installing:
 cloudera-manager-agent                 x86_64               5.16.1-1.cm5161.p0.1.el7                cloudera-manager               9.4 M
Installing for dependencies:
 MySQL-python                           x86_64               1.2.5-1.el7                             base                            90 k
 apr                                    x86_64               1.4.8-3.el7_4.1                         base                           103 k
 apr-util                               x86_64               1.5.2-6.el7                             base                            92 k
 cloudera-manager-daemons               x86_64               5.16.1-1.cm5161.p0.1.el7                cloudera-manager               753 M
 httpd                                  x86_64               2.4.6-89.el7.centos                     updates                        2.7 M
 httpd-tools                            x86_64               2.4.6-89.el7.centos                     updates                         90 k
 keyutils-libs-devel                    x86_64               1.5.8-3.el7                             base                            37 k
 krb5-devel                             x86_64               1.15.1-37.el7_6                         updates                        271 k
 libcom_err-devel                       x86_64               1.42.9-13.el7                           base                            31 k
 libkadm5                               x86_64               1.15.1-37.el7_6                         updates                        178 k
 libselinux-devel                       x86_64               2.5-14.1.el7                            base                           187 k
 libsepol-devel                         x86_64               2.5-10.el7                              base                            77 k
 libtirpc                               x86_64               0.2.4-0.15.el7                          base                            89 k
 libverto-devel                         x86_64               0.2.5-4.el7                             base                            12 k
 mod_ssl                                x86_64               1:2.4.6-89.el7.centos                   updates                        112 k
 openssl-devel                          x86_64               1:1.0.2k-16.el7_6.1                     updates                        1.5 M
 pcre-devel                             x86_64               8.32-17.el7                             base                           480 k
 postgresql-libs                        x86_64               9.2.24-1.el7_5                          base                           234 k
 python-psycopg2                        x86_64               2.5.1-3.el7                             base                           132 k
 rpcbind                                x86_64               0.2.0-47.el7                            base                            60 k
 zlib-devel                             x86_64               1.2.7-18.el7                            base                            50 k
Updating for dependencies:
 krb5-libs                              x86_64               1.15.1-37.el7_6                         updates                        803 k
 openssl                                x86_64               1:1.0.2k-16.el7_6.1                     updates                        493 k
 openssl-libs                           x86_64               1:1.0.2k-16.el7_6.1                     updates                        1.2 M

Transaction Summary
==========================================================================================================================================
Install  1 Package  (+21 Dependent packages)
Upgrade             (  3 Dependent packages)

Total download size: 772 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/25): MySQL-python-1.2.5-1.el7.x86_64.rpm                                                                        |  90 kB  00:00:00     
(2/25): apr-util-1.5.2-6.el7.x86_64.rpm                                                                            |  92 kB  00:00:00     
apr-1.4.8-3.el7_4.1.x86_64.rpm FAILED                                          
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/apr-1.4.8-3.el7_4.1.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
(3/25): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm                                                                 |  37 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/cloudera-manager/packages/cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID e8f86acd: NOKEY
Public key for cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64.rpm is not installed
(4/25): cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64.rpm                                                 | 9.4 MB  00:00:00     
(5/25): krb5-devel-1.15.1-37.el7_6.x86_64.rpm                                                                      | 271 kB  00:00:00     
httpd-tools-2.4.6-89.el7.cento FAILED                                                                   ]  0.0 B/s |  11 MB  --:--:-- ETA 
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/Packages/httpd-tools-2.4.6-89.el7.centos.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
(6/25): httpd-2.4.6-89.el7.centos.x86_64.rpm                                                                       | 2.7 MB  00:00:01     
(7/25): libkadm5-1.15.1-37.el7_6.x86_64.rpm                                                                        | 178 kB  00:00:00     
(8/25): libselinux-devel-2.5-14.1.el7.x86_64.rpm                                                                   | 187 kB  00:00:00     
(9/25): libsepol-devel-2.5-10.el7.x86_64.rpm                                                                       |  77 kB  00:00:00     
(10/25): libtirpc-0.2.4-0.15.el7.x86_64.rpm                                                                        |  89 kB  00:00:00     
(11/25): libverto-devel-0.2.5-4.el7.x86_64.rpm                                                                     |  12 kB  00:00:00     
(12/25): mod_ssl-2.4.6-89.el7.centos.x86_64.rpm                                                                    | 112 kB  00:00:00     
(13/25): openssl-1.0.2k-16.el7_6.1.x86_64.rpm                                                                      | 493 kB  00:00:00     
(14/25): krb5-libs-1.15.1-37.el7_6.x86_64.rpm                                                                      | 803 kB  00:00:01     
(15/25): pcre-devel-8.32-17.el7.x86_64.rpm                                                                         | 480 kB  00:00:01     
(16/25): openssl-devel-1.0.2k-16.el7_6.1.x86_64.rpm                                                                | 1.5 MB  00:00:01     
(17/25): postgresql-libs-9.2.24-1.el7_5.x86_64.rpm                                                                 | 234 kB  00:00:00     
(18/25): openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm                                                                 | 1.2 MB  00:00:01     
(19/25): python-psycopg2-2.5.1-3.el7.x86_64.rpm                                                                    | 132 kB  00:00:00     
(20/25): rpcbind-0.2.0-47.el7.x86_64.rpm                                                                           |  60 kB  00:00:00     
(21/25): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                        |  50 kB  00:00:00     
(22/25): apr-1.4.8-3.el7_4.1.x86_64.rpm                                                                            | 103 kB  00:00:00     
(23/25): httpd-tools-2.4.6-89.el7.centos.x86_64.rpm                                                                |  90 kB  00:00:00     
(24/25): libcom_err-devel-1.42.9-13.el7.x86_64.rpm                                                                 |  31 kB  00:00:04     
(25/25): cloudera-manager-daemons-5.16.1-1.cm5161.p0.1.el7.x86_64.rpm                                              | 753 MB  00:00:17     
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                      43 MB/s | 772 MB  00:00:17     
Retrieving key from http://node201.yinzhengjie.org.cn/cm-5.16.1/RPM-GPG-KEY-cloudera
Importing GPG key 0xE8F86ACD:
 Userid     : "Yum Maintainer <webmaster@cloudera.com>"
 Fingerprint: 5f14 d39e f068 1aca 6f04 4a43 f90c 0d8f e8f8 6acd
 From       : http://node201.yinzhengjie.org.cn/cm-5.16.1/RPM-GPG-KEY-cloudera
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                               1/28 
  Updating   : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                      2/28 
  Installing : apr-1.4.8-3.el7_4.1.x86_64                                                                                            3/28 
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                                           4/28 
  Updating   : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                    5/28 
  Installing : httpd-tools-2.4.6-89.el7.centos.x86_64                                                                                6/28 
  Installing : httpd-2.4.6-89.el7.centos.x86_64                                                                                      7/28 
  Installing : 1:mod_ssl-2.4.6-89.el7.centos.x86_64                                                                                  8/28 
  Installing : libkadm5-1.15.1-37.el7_6.x86_64                                                                                       9/28 
  Installing : postgresql-libs-9.2.24-1.el7_5.x86_64                                                                                10/28 
  Installing : python-psycopg2-2.5.1-3.el7.x86_64                                                                                   11/28 
  Installing : libtirpc-0.2.4-0.15.el7.x86_64                                                                                       12/28 
  Installing : rpcbind-0.2.0-47.el7.x86_64                                                                                          13/28 
  Installing : MySQL-python-1.2.5-1.el7.x86_64                                                                                      14/28 
  Installing : cloudera-manager-daemons-5.16.1-1.cm5161.p0.1.el7.x86_64                                                             15/28 
  Installing : libsepol-devel-2.5-10.el7.x86_64                                                                                     16/28 
  Installing : zlib-devel-1.2.7-18.el7.x86_64                                                                                       17/28 
  Installing : libverto-devel-0.2.5-4.el7.x86_64                                                                                    18/28 
  Installing : libcom_err-devel-1.42.9-13.el7.x86_64                                                                                19/28 
  Installing : pcre-devel-8.32-17.el7.x86_64                                                                                        20/28 
  Installing : libselinux-devel-2.5-14.1.el7.x86_64                                                                                 21/28 
  Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                               22/28 
  Installing : krb5-devel-1.15.1-37.el7_6.x86_64                                                                                    23/28 
  Installing : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                             24/28 
  Installing : cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64                                                               25/28 
  Cleanup    : 1:openssl-1.0.2k-16.el7.x86_64                                                                                       26/28 
  Cleanup    : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                                  27/28 
  Cleanup    : krb5-libs-1.15.1-34.el7.x86_64                                                                                       28/28 
  Verifying  : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                                1/28 
  Verifying  : MySQL-python-1.2.5-1.el7.x86_64                                                                                       2/28 
  Verifying  : pcre-devel-8.32-17.el7.x86_64                                                                                         3/28 
  Verifying  : 1:mod_ssl-2.4.6-89.el7.centos.x86_64                                                                                  4/28 
  Verifying  : libcom_err-devel-1.42.9-13.el7.x86_64                                                                                 5/28 
  Verifying  : krb5-devel-1.15.1-37.el7_6.x86_64                                                                                     6/28 
  Verifying  : httpd-tools-2.4.6-89.el7.centos.x86_64                                                                                7/28 
  Verifying  : libverto-devel-0.2.5-4.el7.x86_64                                                                                     8/28 
  Verifying  : zlib-devel-1.2.7-18.el7.x86_64                                                                                        9/28 
  Verifying  : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                     10/28 
  Verifying  : python-psycopg2-2.5.1-3.el7.x86_64                                                                                   11/28 
  Verifying  : cloudera-manager-agent-5.16.1-1.cm5161.p0.1.el7.x86_64                                                               12/28 
  Verifying  : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                   13/28 
  Verifying  : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                             14/28 
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                                          15/28 
  Verifying  : rpcbind-0.2.0-47.el7.x86_64                                                                                          16/28 
  Verifying  : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                              17/28 
  Verifying  : httpd-2.4.6-89.el7.centos.x86_64                                                                                     18/28 
  Verifying  : libsepol-devel-2.5-10.el7.x86_64                                                                                     19/28 
  Verifying  : apr-1.4.8-3.el7_4.1.x86_64                                                                                           20/28 
  Verifying  : cloudera-manager-daemons-5.16.1-1.cm5161.p0.1.el7.x86_64                                                             21/28 
  Verifying  : libkadm5-1.15.1-37.el7_6.x86_64                                                                                      22/28 
  Verifying  : libselinux-devel-2.5-14.1.el7.x86_64                                                                                 23/28 
  Verifying  : postgresql-libs-9.2.24-1.el7_5.x86_64                                                                                24/28 
  Verifying  : libtirpc-0.2.4-0.15.el7.x86_64                                                                                       25/28 
  Verifying  : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                                  26/28 
  Verifying  : 1:openssl-1.0.2k-16.el7.x86_64                                                                                       27/28 
  Verifying  : krb5-libs-1.15.1-34.el7.x86_64                                                                                       28/28 

Installed:
  cloudera-manager-agent.x86_64 0:5.16.1-1.cm5161.p0.1.el7                                                                                

Dependency Installed:
  MySQL-python.x86_64 0:1.2.5-1.el7                          apr.x86_64 0:1.4.8-3.el7_4.1                                                
  apr-util.x86_64 0:1.5.2-6.el7                              cloudera-manager-daemons.x86_64 0:5.16.1-1.cm5161.p0.1.el7                  
  httpd.x86_64 0:2.4.6-89.el7.centos                         httpd-tools.x86_64 0:2.4.6-89.el7.centos                                    
  keyutils-libs-devel.x86_64 0:1.5.8-3.el7                   krb5-devel.x86_64 0:1.15.1-37.el7_6                                         
  libcom_err-devel.x86_64 0:1.42.9-13.el7                    libkadm5.x86_64 0:1.15.1-37.el7_6                                           
  libselinux-devel.x86_64 0:2.5-14.1.el7                     libsepol-devel.x86_64 0:2.5-10.el7                                          
  libtirpc.x86_64 0:0.2.4-0.15.el7                           libverto-devel.x86_64 0:0.2.5-4.el7                                         
  mod_ssl.x86_64 1:2.4.6-89.el7.centos                       openssl-devel.x86_64 1:1.0.2k-16.el7_6.1                                    
  pcre-devel.x86_64 0:8.32-17.el7                            postgresql-libs.x86_64 0:9.2.24-1.el7_5                                     
  python-psycopg2.x86_64 0:2.5.1-3.el7                       rpcbind.x86_64 0:0.2.0-47.el7                                               
  zlib-devel.x86_64 0:1.2.7-18.el7                          

Dependency Updated:
  krb5-libs.x86_64 0:1.15.1-37.el7_6          openssl.x86_64 1:1.0.2k-16.el7_6.1          openssl-libs.x86_64 1:1.0.2k-16.el7_6.1         

Complete!
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# yum -y install cloudera-manager-agent

3>.修改Cloudera Manager Agent各节点的配置文件

[root@node204.yinzhengjie.org.cn ~]# grep server_host /etc/cloudera-scm-agent/config.ini
server_host=localhost
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# sed -i 's/server_host=localhost/server_host=node201.yinzhengjie.org.cn/g' /etc/cloudera-scm-agent/config.ini
[root@node204.yinzhengjie.org.cn ~]# [root@node204.yinzhengjie.org.cn ~]# grep server_host /etc/cloudera-scm-agent/config.ini server_host=node201.yinzhengjie.org.cn [root@node204.yinzhengjie.org.cn ~]# [root@node204.yinzhengjie.org.cn ~]#

4>.启动Cloudera Manager Server端

[root@node204.yinzhengjie.org.cn ~]# systemctl start cloudera-scm-agent
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# systemctl status cloudera-scm-agent
● cloudera-scm-agent.service - LSB: Cloudera SCM Agent
   Loaded: loaded (/etc/rc.d/init.d/cloudera-scm-agent; bad; vendor preset: disabled)
   Active: active (exited) since Fri 2019-06-28 09:22:53 EDT; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 9952 ExecStart=/etc/rc.d/init.d/cloudera-scm-agent start (code=exited, status=0/SUCCESS)

Jun 28 09:22:52 node204.yinzhengjie.org.cn systemd[1]: Starting LSB: Cloudera SCM Agent...
Jun 28 09:22:52 node204.yinzhengjie.org.cn su[9970]: (to root) root on none
Jun 28 09:22:52 node204.yinzhengjie.org.cn su[9970]: pam_limits(su:session): wrong limit value 'unlimited ' for limit type 'hard'
Jun 28 09:22:53 node204.yinzhengjie.org.cn cloudera-scm-agent[9952]: Starting cloudera-scm-agent: [  OK  ]
Jun 28 09:22:53 node204.yinzhengjie.org.cn systemd[1]: Started LSB: Cloudera SCM Agent.
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# systemctl enable cloudera-scm-agent
cloudera-scm-agent.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig cloudera-scm-agent on
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

cloudera-scm-agent      0:off   1:off   2:on    3:on    4:on    5:on    6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# 

5>.同步时区及NTP服务

[root@node204.yinzhengjie.org.cn ~]# yum -y install ntp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.yun-idc.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package ntp.x86_64 0:4.2.6p5-28.el7.centos will be installed
--> Processing Dependency: ntpdate = 4.2.6p5-28.el7.centos for package: ntp-4.2.6p5-28.el7.centos.x86_64
--> Processing Dependency: libopts.so.25()(64bit) for package: ntp-4.2.6p5-28.el7.centos.x86_64
--> Running transaction check
---> Package autogen-libopts.x86_64 0:5.18-5.el7 will be installed
---> Package ntpdate.x86_64 0:4.2.6p5-28.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                    Arch                              Version                                             Repository                       Size
========================================================================================================================================================================
Installing:
 ntp                                        x86_64                            4.2.6p5-28.el7.centos                               base                            549 k
Installing for dependencies:
 autogen-libopts                            x86_64                            5.18-5.el7                                          base                             66 k
 ntpdate                                    x86_64                            4.2.6p5-28.el7.centos                               base                             86 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 701 k
Installed size: 1.6 M
Downloading packages:
(1/3): autogen-libopts-5.18-5.el7.x86_64.rpm                                                                                                     |  66 kB  00:00:00     
(2/3): ntpdate-4.2.6p5-28.el7.centos.x86_64.rpm                                                                                                  |  86 kB  00:00:00     
(3/3): ntp-4.2.6p5-28.el7.centos.x86_64.rpm                                                                                                      | 549 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   2.3 MB/s | 701 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : autogen-libopts-5.18-5.el7.x86_64                                                                                                                    1/3 
  Installing : ntpdate-4.2.6p5-28.el7.centos.x86_64                                                                                                                 2/3 
  Installing : ntp-4.2.6p5-28.el7.centos.x86_64                                                                                                                     3/3 
  Verifying  : ntpdate-4.2.6p5-28.el7.centos.x86_64                                                                                                                 1/3 
  Verifying  : autogen-libopts-5.18-5.el7.x86_64                                                                                                                    2/3 
  Verifying  : ntp-4.2.6p5-28.el7.centos.x86_64                                                                                                                     3/3 

Installed:
  ntp.x86_64 0:4.2.6p5-28.el7.centos                                                                                                                                    

Dependency Installed:
  autogen-libopts.x86_64 0:5.18-5.el7                                               ntpdate.x86_64 0:4.2.6p5-28.el7.centos                                              

Complete!
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# yum -y install ntp
[root@node204.yinzhengjie.org.cn ~]# rm -rf /etc/localtime
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# date -R
Fri, 28 Jun 2019 21:37:29 +0800
[root@node204.yinzhengjie.org.cn ~]# 
[root@node204.yinzhengjie.org.cn ~]# crontab -l
*/1 * * * * /usr/sbin/ntpdate node201.yinzhengjie.org.cn
[root@node204.yinzhengjie.org.cn ~]# 

 

三.创建主机模板

1>.点击主机模板

2>.创建主机模板

3>.主机模板创建成功

 

四.CDH节点服役

1>.点击主机

2>.点击"向集群添加新主机"

3>.进入添加主机向导

4>.为CDH集群安装指定主机

5>.激活agent节点

6>.等待主机检查完成,点击继续

7>.选择主机模板

8>.

9>.

 

 

10>.

 

11>.

mysql> SELECT * FROM HOSTS;
+---------+-------------------------+--------------------------------------+----------------------------+--------------+----------+--------+---------------------+-------------------+--------------------+------------+-----------+----------------------+-------------+-------------------+----------------+
| HOST_ID | OPTIMISTIC_LOCK_VERSION | HOST_IDENTIFIER                      | NAME                       | IP_ADDRESS   | RACK_ID  | STATUS | CONFIG_CONTAINER_ID | MAINTENANCE_COUNT | DECOMMISSION_COUNT | CLUSTER_ID | NUM_CORES | TOTAL_PHYS_MEM_BYTES | PUBLIC_NAME | PUBLIC_IP_ADDRESS | CLOUD_PROVIDER |
+---------+-------------------------+--------------------------------------+----------------------------+--------------+----------+--------+---------------------+-------------------+--------------------+------------+-----------+----------------------+-------------+-------------------+----------------+
|       1 |                      11 | f12d8ded-5b43-4c67-b6a4-812682ad3a0f | node202.yinzhengjie.org.cn | 172.30.1.202 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           1907970048 | NULL        | NULL              | NULL           |
|       2 |                      11 | ab48a657-8799-4d3f-9a14-958092204861 | node203.yinzhengjie.org.cn | 172.30.1.203 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           3954188288 | NULL        | NULL              | NULL           |
|       3 |                      11 | c5cda983-1a94-4720-bf5d-177308cce46f | node201.yinzhengjie.org.cn | 172.30.1.201 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           8182046720 | NULL        | NULL              | NULL           |
|       4 |                       5 | 4bcf1805-1981-444b-a4c6-b512c9ccf1ec | node204.yinzhengjie.org.cn | 172.30.1.204 | /default | NA     |                   1 |                 0 |                  0 |          1 |         4 |           8182046720 | NULL        | NULL              | NULL           |
+---------+-------------------------+--------------------------------------+----------------------------+--------------+----------+--------+---------------------+-------------------+--------------------+------------+-----------+----------------------+-------------+-------------------+----------------+
4 rows in set (0.00 sec)

mysql> 
mysql> 

 

posted @ 2019-06-28 21:02  尹正杰  阅读(449)  评论(0编辑  收藏  举报