CDH6.3.1安装详细步骤(感写B站若泽大数据)

0. 主机规划

虚拟机主机 IP 资源(CPU/内存/硬盘) 所在ESXi(IP)
Tools 192.168.1.30 04 Core/8 GB/10 TB 192.168.1.202
CDH-server01 192.168.1.31 32 Core/64 GB/3 TB 192.168.1.202
CDH-agent01 192.168.1.41 16 Core/32 GB/3 TB 192.168.1.202
CDH-agent02 192.168.1.42 16 Core/32 GB/3 TB 192.168.1.203
CDH-agent03 192.168.1.43 16 Core/32 GB/3 TB 192.168.1.203
CDH-agent04 192.168.1.44 16 Core/32 GB/3 TB 192.168.1.204

注1:虚拟机centos7是模板,其他虚拟机可以由centos7克隆
注2:用户名:root 密码:ahu=2018

1. 配置静态IP(主、次)

vi /etc/sysconfig/network-scripts/ifcfg-ens192
# 把文件内容修改为以下内容
    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    PEERDNS=yes
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_PEERDNS=yes
    IPV6_PEERROUTES=yes
    IPV6_FAILURE_FATAL=no
    NAME=eno192              #使用原NAME
    UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11
    ONBOOT=yes
    IPADDR0=192.168.1.30     # 根据需要填写
    PREFIXO0=24
    GATEWAY0=192.168.1.1
    DNS1=8.8.8.8
    DNS2=8.8.4.4
service network restart

2. 集群初始化(主、次)

2.1 修改主机hostname

# 修改为虚拟主机名,例如:
vi /etc/hostname
修改
    cdh-agent01

2.2 修改主机hosts

echo "192.168.1.31 cdh-server01" >> /etc/hosts
echo "192.168.1.41 cdh-agent01" >> /etc/hosts
echo "192.168.1.42 cdh-agent02" >> /etc/hosts
echo "192.168.1.43 cdh-agent03" >> /etc/hosts
echo "192.168.1.44 cdh-agent04" >> /etc/hosts  

2.3 关闭防火墙和清空规则

systemctl stop firewalld
systemctl disable firewalld
iptables -F

2.4 selinux关闭

vi /etc/selinux/config
修改
    selinux=disabled

2.5 时区与时间同步

date
timedatectl --help
timedatectl set-timezone Asia/Shanghai

2.6 时间同步(一主多从)

yum install -y ntp
# 主节点
vi /etc/ntp.conf
添加
    server 127.127.1.0 iburst local clock
    restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
systemctl start ntpd
systemctl status ntpd
ntpq -p
# 次节点
systemctl stop ntpd
systemctl disable ntpd
ntpdate cdh-server01
crontab -e
添加
    # 分 时 日 月 周,每天00:00执行该脚本
    00 00 * * * /usr/sbin/ntpdate cdh-server01

3. 安装JDK(主、次)

3.1 由Tools把软件包移动到主节点

# Tools
scp -r CDH6.3.1 192.168.1.31:/root/
# 次节点
mkdir CDH6.3.1
cd CDH6.3.1
# 主节点
cd CDH6.3.1
scp jdk-8u45-linux-x64.gz  cdh-agent01:/root/CDH6.3.1/
scp jdk-8u45-linux-x64.gz  cdh-agent02:/root/CDH6.3.1/
scp jdk-8u45-linux-x64.gz  cdh-agent03:/root/CDH6.3.1/
scp jdk-8u45-linux-x64.gz  cdh-agent04:/root/CDH6.3.1/

3.2 jdk安装

mkdir /usr/java
tar -zxvf jdk-8u45-linux-x64.gz -C /usr/java
cd /usr/java/
ll
chown -R root:root /usr/java/jdk1.8.0_45
vi /etc/profile
添加
    export JAVA_HOME=/usr/java/jdk1.8.0_45
    export PATH=${JAVA_HOME}/bin:${PATH}
source /etc/profile
which java

4. 离线部署MySQL(主)

4.1 解压及创建my.cnf

cd /root/CDH6.3.1/
tar xzvf mysql-5.7.11-linux-glibc2.5-x86_64.tar.gz -C /usr/local
ll
cd /usr/local
ll
mv mysql-5.7.11-linux-glibc2.5-x86_64 mysql
ll
mkdir mysql/arch mysql/data mysql/tmp
vi /etc/my.cnf
:.,$d
添加
[client]
port            = 3306
socket          = /usr/local/mysql/data/mysql.sock
default-character-set=utf8mb4

[mysqld]
port            = 3306
socket          = /usr/local/mysql/data/mysql.sock

skip-slave-start

skip-external-locking
key_buffer_size = 256M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 4M
query_cache_size= 32M
max_allowed_packet = 16M
myisam_sort_buffer_size=128M
tmp_table_size=32M

table_open_cache = 512
thread_cache_size = 8
wait_timeout = 86400
interactive_timeout = 86400
max_connections = 600

# Try number of CPU's*2 for thread_concurrency
#thread_concurrency = 32 

#isolation level and default engine
default-storage-engine = INNODB
transaction-isolation = READ-COMMITTED

server-id  = 1739
basedir     = /usr/local/mysql
datadir     = /usr/local/mysql/data
pid-file     = /usr/local/mysql/data/hostname.pid

#open performance schema
log-warnings
sysdate-is-now

binlog_format = ROW
log_bin_trust_function_creators=1
log-error  = /usr/local/mysql/data/hostname.err
log-bin = /usr/local/mysql/arch/mysql-bin
expire_logs_days = 7

innodb_write_io_threads=16

relay-log  = /usr/local/mysql/relay_log/relay-log
relay-log-index = /usr/local/mysql/relay_log/relay-log.index
relay_log_info_file= /usr/local/mysql/relay_log/relay-log.info

log_slave_updates=1
gtid_mode=OFF
enforce_gtid_consistency=OFF

# slave
slave-parallel-type=LOGICAL_CLOCK
slave-parallel-workers=4
master_info_repository=TABLE
relay_log_info_repository=TABLE
relay_log_recovery=ON

#other logs
#general_log =1
#general_log_file  = /usr/local/mysql/data/general_log.err
#slow_query_log=1
#slow_query_log_file=/usr/local/mysql/data/slow_log.err

#for replication slave
sync_binlog = 500

#for innodb options
innodb_data_home_dir = /usr/local/mysql/data/
innodb_data_file_path = ibdata1:1G;ibdata2:1G:autoextend

innodb_log_group_home_dir = /usr/local/mysql/arch
innodb_log_files_in_group = 4
innodb_log_file_size = 1G
innodb_log_buffer_size = 200M

#根据生产需要,调整pool size
innodb_buffer_pool_size = 2G
#innodb_additional_mem_pool_size = 50M #deprecated in 5.6
tmpdir = /usr/local/mysql/tmp

innodb_lock_wait_timeout = 1000
#innodb_thread_concurrency = 0
innodb_flush_log_at_trx_commit = 2

innodb_locks_unsafe_for_binlog=1

#innodb io features: add for mysql5.5.8
performance_schema
innodb_read_io_threads=4
innodb-write-io-threads=4
innodb-io-capacity=200
#purge threads change default(0) to 1 for purge
innodb_purge_threads=1
innodb_use_native_aio=on

#case-sensitive file names and separate tablespace
innodb_file_per_table = 1
lower_case_table_names=1

[mysqldump]
quick
max_allowed_packet = 128M

[mysql]
no-auto-rehash
default-character-set=utf8mb4

[mysqlhotcopy]
interactive-timeout

[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

4.2 创建用户组及用户

[[email protected] local]# groupadd -g 101 dba
[[email protected] local]# useradd -u 514 -g dba -G root -d /usr/local/mysql mysqladmin
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
[[email protected] local]# cp /etc/skel/.* /usr/local/mysql
cp: omitting directory ‘/etc/skel/.’
cp: omitting directory ‘/etc/skel/..’
[[email protected] local]# vi mysql/.bashrc
添加
    export MYSQL_BASE=/usr/local/mysql
    export PATH=${MYSQL_BASE}/bin:$PATH
[[email protected] local]# chown  mysqladmin:dba /etc/my.cnf
[[email protected] local]# chmod  640 /etc/my.cnf
[[email protected] local]# chown -R mysqladmin:dba /usr/local/mysql
[[email protected] local]# chmod -R 755 /usr/local/mysql
[[email protected] local]# cd /usr/local/mysql
[[email protected] mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysql
[[email protected] mysql]# chmod +x /etc/rc.d/init.d/mysql
[[email protected] mysql]# chkconfig --add mysql
[[email protected] mysql]# bin/mysqld --defaults-file=/etc/my.cnf --user=mysqladmin --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --initialize
[[email protected] mysql]# cd data
[[email protected] data]# cat hostname.err |grep password
2019-12-06T14:24:59.548965Z 1 [Note] A temporary password is generated for [email protected]: r4jSaWdRd;yq
[[email protected] data]# su - mysqladmin
[[email protected] ~]$ service mysql start
Starting MySQL... SUCCESS!
[[email protected] ~]$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.11-log

Copyright (c) 2000, 2016, 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> exit;
Bye
[[email protected] ~]$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.11-log

Copyright (c) 2000, 2016, 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> alter user [email protected] identified by 'ahu=2018';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'ahu=2018' ;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> exit;
Bye
[[email protected] ~]$ service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!
[[email protected] ~]$ mysql -uroot -pahu=2018
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 2
Server version: 5.7.11-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, 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> create database cmf default character set utf8;
Query OK, 1 row affected (0.00 sec)

mysql> create database amon default character set utf8;
Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on cmf.*  to 'cmf'@'%' identified by 'ahu=2018';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> grant all privileges on amon.*  to 'amon'@'%' identified by 'ahu=2018';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye
[[email protected] ~]$ exit;
logout
[[email protected] data]# cd
[[email protected] ~]# cd CDH6.3.1/
[[email protected] CDH6.3.1]# ll
total 4118988
-rw-r--r--. 1 root root 2083878000 Dec  5 22:05 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel
-rw-r--r--. 1 root root         40 Dec  5 22:06 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1
-rw-r--r--. 1 root root 1411444147 Dec  5 22:06 cm6.3.1-redhat7.tar.gz
-rw-r--r--. 1 root root  173271626 Dec  5 22:07 jdk-8u45-linux-x64.gz
-rw-r--r--. 1 root root      33887 Dec  5 22:07 manifest.json
-rw-r--r--. 1 root root  548193637 Dec  5 22:07 mysql-5.7.11-linux-glibc2.5-x86_64.tar.gz
-rw-r--r--. 1 root root    1007502 Dec  5 22:07 mysql-connector-java-5.1.47.jar
[[email protected] CDH6.3.1]# mkdir -p /usr/share/java
[[email protected] CDH6.3.1]# cp mysql-connector-java-5.1.47.jar  /usr/share/java/mysql-connector-java.jar
[[email protected] CDH6.3.1]#

5. rpm包部署CM

5.1 主节点

[[email protected] CDH6.3.1]# tar -xzvf cm6.3.1-redhat7.tar.gz
[[email protected] CDH6.3.1]# ll
total 4118988
-rw-r--r--. 1 root root 2083878000 Dec  5 22:05 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel
-rw-r--r--. 1 root root         40 Dec  5 22:06 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1
drwxrwxr-x. 5 2001 2001         75 Sep 25 16:51 cm6.3.1
-rw-r--r--. 1 root root 1411444147 Dec  5 22:06 cm6.3.1-redhat7.tar.gz
-rw-r--r--. 1 root root  173271626 Dec  5 22:07 jdk-8u45-linux-x64.gz
-rw-r--r--. 1 root root      33887 Dec  5 22:07 manifest.json
-rw-r--r--. 1 root root  548193637 Dec  5 22:07 mysql-5.7.11-linux-glibc2.5-x86_64.tar.gz
-rw-r--r--. 1 root root    1007502 Dec  5 22:07 mysql-connector-java-5.1.47.jar
[[email protected] CDH6.3.1]# cd cm6.3.1
[[email protected] cm6.3.1]# ll
total 8
drwxrwxr-x. 2 2001 2001 4096 Sep 25 16:51 repodata
-rw-rw-r--. 1 2001 2001 1718 Sep 25 16:51 RPM-GPG-KEY-cloudera
drwxrwxr-x. 4 2001 2001   34 Sep 25 16:50 RPMS
drwxrwxr-x. 2 2001 2001    6 Sep 25 16:50 SRPMS
[[email protected] cm6.3.1]# cd RPMS/
[[email protected] RPMS]# ll
total 4
drwxrwxr-x. 2 2001 2001    6 Sep 25 16:50 noarch
drwxrwxr-x. 2 2001 2001 4096 Sep 25 16:51 x86_64
[[email protected] RPMS]# cd x86_64/
[[email protected] x86_64]# ll
total 1380420
-rw-r--r--. 1 2001 2001   10483568 Sep 25 16:51 cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
-rw-r--r--. 1 2001 2001 1203832464 Sep 25 16:50 cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
-rw-r--r--. 1 2001 2001      11488 Sep 25 16:51 cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm
-rw-r--r--. 1 2001 2001      10996 Sep 25 16:51 cloudera-manager-server-db-2-6.3.1-1466458.el7.x86_64.rpm
-rw-r--r--. 1 2001 2001   14209868 Sep 25 16:51 enterprise-debuginfo-6.3.1-1466458.el7.x86_64.rpm
-rw-rw-r--. 1 2001 2001  184988341 Sep 25 16:51 oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm
[[email protected] x86_64]# rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
warning: cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b0b19c9f: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:cloudera-manager-daemons-6.3.1-14################################# [100%]
[[email protected] x86_64]# rpm -ivh cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm --nodeps --forcewarning: cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b0b19c9f: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:cloudera-manager-server-6.3.1-146################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-server.service to /usr/lib/systemd/system/cloudera-scm-server.service.
[[email protected] x86_64]# cd
[[email protected] ~]# cd /etc/cloudera-scm-server/
[[email protected] cloudera-scm-server]# ll
total 20
-rw-r--r--. 1 root         root         8197 Sep 25 16:34 cmSubCaCert.profile
-rw-------. 1 cloudera-scm cloudera-scm  757 Sep 25 16:34 db.properties
-rw-r--r--. 1 root         root         3027 Sep 25 16:34 log4j.properties
[[email protected] cloudera-scm-server]# vi db.properties
    # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
    #
    # This file describes the database connection.
    #

    # The database type
    # Currently 'mysql', 'postgresql' and 'oracle' are valid databases.
    com.cloudera.cmf.db.type=mysql

    # The database host
    # If a non standard port is needed, use 'hostname:port'
    com.cloudera.cmf.db.host=cdh-server01

    # The database name
    com.cloudera.cmf.db.name=cmf

    # The database user
    com.cloudera.cmf.db.user=cmf

    # The database user's password
    com.cloudera.cmf.db.password=ahu=2018

    # The db setup type
    # After fresh install it is set to INIT
    # and will be changed post config.
    # If scm-server uses Embedded DB then it is set to EMBEDDED
    # If scm-server uses External DB then it is set to EXTERNAL
    com.cloudera.cmf.db.setupType=EXTERNAL
[[email protected] cloudera-scm-server]# service cloudera-scm-server start
Redirecting to /bin/systemctl start cloudera-scm-server.service
[[email protected] cloudera-scm-server]# service cloudera-scm-server status
Redirecting to /bin/systemctl status cloudera-scm-server.service
● cloudera-scm-server.service - Cloudera CM Server Service
   Loaded: loaded (/usr/lib/systemd/system/cloudera-scm-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2019-12-07 14:59:23 CST; 5s ago
  Process: 5278 ExecStartPre=/opt/cloudera/cm/bin/cm-server-pre (code=exited, status=0/SUCCESS)
 Main PID: 5281 (java)
   CGroup: /system.slice/cloudera-scm-server.service
           └─5281 /usr/java/jdk1.8.0_45/bin/java -cp .:/usr/share/java/mysql-connector-java.jar:/usr/sh...

Dec 07 14:59:23 cdh-server01 cm-server[5281]: JAVA_HOME=/usr/java/jdk1.8.0_45
Dec 07 14:59:23 cdh-server01 cm-server[5281]: Java HotSpot(TM) 64-Bit Server VM warning: ignoring op...8.0
Dec 07 14:59:25 cdh-server01 cm-server[5281]: ERROR StatusLogger No log4j2 configuration file found....ng.
Dec 07 14:59:26 cdh-server01 cm-server[5281]: Sat Dec 07 14:59:26 CST 2019 WARN: Establishing SSL co...lic
Dec 07 14:59:26 cdh-server01 cm-server[5281]: Sat Dec 07 14:59:26 CST 2019 WARN: Establishing SSL co...lic
Dec 07 14:59:26 cdh-server01 cm-server[5281]: Sat Dec 07 14:59:26 CST 2019 WARN: Establishing SSL co...lic
Dec 07 14:59:26 cdh-server01 cm-server[5281]: Sat Dec 07 14:59:26 CST 2019 WARN: Establishing SSL co...lic
Dec 07 14:59:26 cdh-server01 cm-server[5281]: Sat Dec 07 14:59:26 CST 2019 WARN: Establishing SSL co...lic
Dec 07 14:59:29 cdh-server01 cm-server[5281]: 14:59:29.012 [main] ERROR org.hibernate.engine.jdbc.sp...ist
Dec 07 14:59:29 cdh-server01 cm-server[5281]: Sat Dec 07 14:59:29 CST 2019 WARN: Establishing SSL co...lic
Hint: Some lines were ellipsized, use -l to show in full.
[[email protected] cloudera-scm-server]#
    # 此处启动一个新的主节点窗口,检查cloudera-scm-server服务启动日志
    # 出现7180,则证明成功,否则检查log文件,寻找问题
    # 网页打开192.168.1.31:7180,维持不动
    [[email protected] ~]# cd /var/log/cloudera-scm-server/
    [[email protected] cloudera-scm-server]# ll
    total 0
    [[email protected] cloudera-scm-server]# ll
    total 28
    -rw-r-----. 1 cloudera-scm cloudera-scm 28451 Dec  7 14:59 cloudera-scm-server.log
    -rw-r-----. 1 cloudera-scm cloudera-scm     0 Dec  7 14:59 cmf-server-nio.log
    -rw-r-----. 1 cloudera-scm cloudera-scm     0 Dec  7 14:59 cmf-server-perf.log
    [[email protected] cloudera-scm-server]# tail -F cloudera-scm-server.log
    2019-12-07 15:00:39,657 INFO WebServerImpl:org.eclipse.jetty.server.AbstractConnector: Started [email protected]{HTTP/1.1,[http/1.1]}{0.0.0.0:7180}
    2019-12-07 15:00:39,658 INFO WebServerImpl:org.eclipse.jetty.server.Server: Started @75687ms
    2019-12-07 15:00:39,658 INFO WebServerImpl:com.cloudera.server.cmf.WebServerImpl: Started Jetty server.
    2019-12-07 15:00:43,528 ERROR ParcelUpdateService:com.cloudera.parcel.components.ParcelDownloaderImpl: Failed to download manifest. Status code: 404 URI: https://archive.cloudera.com/sqoop-teradata-connector1/1.7.1c6/manifest.json/
[[email protected] cloudera-scm-server]#
[[email protected] cloudera-scm-server]# cd
[[email protected] CDH6.3.1]# cd CDH6.3.1/cm6.3.1/RPMS/x86_64/
[[email protected] x86_64]# rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
warning: cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b0b19c9f: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:cloudera-manager-agent-6.3.1-1466################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service.
[[email protected] x86_64]# vi /etc/cloudera-scm-agent/config.ini
# 修改
    server_host=cdh-server01
[[email protected] x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent01:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent02:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent03:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent04:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent05:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent01:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent02:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent03:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent04:/root/CDH6.3.1/
[[email protected] x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent05:/root/CDH6.3.1/
[[email protected] x86_64]#

5.2 次节点

[[email protected] java]# cd /root/CDH6.3.1/
You have new mail in /var/spool/mail/root
[[email protected] CDH6.3.1]# ll
total 1355072
-rw-r--r--. 1 root root   10483568 Dec  7 15:20 cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
-rw-r--r--. 1 root root 1203832464 Dec  7 15:22 cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
-rw-r--r--. 1 root root  173271626 Dec  5 23:01 jdk-8u45-linux-x64.gz
[[email protected] CDH6.3.1]# rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
warning: cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b0b19c9f: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:cloudera-manager-daemons-6.3.1-14################################# [100%]
[[email protected] CDH6.3.1]# rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --forcewarning: cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b0b19c9f: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:cloudera-manager-agent-6.3.1-1466################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service.
[[email protected] CDH6.3.1]# vi /etc/cloudera-scm-agent/config.ini
# 修改
    server_host=cdh-server01

5.3 启动agent服务(主、次节点)

[[email protected] x86_64]# service cloudera-scm-agent start
Redirecting to /bin/systemctl start cloudera-scm-agent.service
[[email protected] CDH6.3.1]# service cloudera-scm-agent status
Redirecting to /bin/systemctl status cloudera-scm-agent.service
● cloudera-scm-agent.service - Cloudera Manager Agent Service
   Loaded: loaded (/usr/lib/systemd/system/cloudera-scm-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2019-12-07 15:42:30 CST; 1min 5s ago
 Main PID: 3299 (cmagent)
   CGroup: /system.slice/cloudera-scm-agent.service
           └─3299 /usr/bin/python2 /opt/cloudera/cm-agent/bin/cm agent

Dec 07 15:42:32 cdh-agent01 cm[3299]: [07/Dec/2019 15:42:32 +0000] 3299 MainThread agent        INF...lood
Dec 07 15:42:32 cdh-agent01 cm[3299]: [07/Dec/2019 15:42:32 +0000] 3299 MainThread agent        INF...lude
Dec 07 15:42:32 cdh-agent01 cm[3299]: [07/Dec/2019 15:42:32 +0000] 3299 MainThread agent        INF...oups
Dec 07 15:42:32 cdh-agent01 cm[3299]: [07/Dec/2019 15:42:32 +0000] 3299 MainThread agent        INF...cess
Dec 07 15:42:32 cdh-agent01 cm[3299]: [07/Dec/2019 15:42:32 +0000] 3299 MainThread tmpfs        INF...cess
Dec 07 15:42:32 cdh-agent01 cm[3299]: [07/Dec/2019 15:42:32 +0000] 3299 MainThread logging      INF....log
Dec 07 15:42:38 cdh-agent01 cm[3299]: status_server: added process group
Dec 07 15:42:38 cdh-agent01 cm[3299]: flood: added process group
Dec 07 15:42:38 cdh-agent01 cm[3299]: /opt/cloudera/cm-agent/lib/python2.7/site-packages/psutil/_ps...to 0
Dec 07 15:42:38 cdh-agent01 cm[3299]: warnings.warn(msg, RuntimeWarning)
Hint: Some lines were ellipsized, use -l to show in full.
[[email protected] CDH6.3.1]#yum install -y perl
  ...
  perl-Time-Local.noarch 0:1.2300-2.el7           perl-constant.noarch 0:1.27-2.el7
  perl-libs.x86_64 4:5.16.3-294.el7_6             perl-macros.x86_64 4:5.16.3-294.el7_6
  perl-parent.noarch 1:0.225-244.el7              perl-podlators.noarch 0:2.5.1-3.el7
  perl-threads.x86_64 0:1.87-4.el7                perl-threads-shared.x86_64 0:1.43-6.el7
Complete!
[[email protected] x86_64]#

5.4 web页面配置信息

step 1. 网页打开192.168.1.31:7180,登录(admin/admin)

step 2. CM版本选择,选择免费版本

step 3. 集群名称,此处根据实际命名

step 4. 指定主机

step 5. 准备parcel(主)

[[email protected] x86_64]# cd
[[email protected] ~]# cd CDH6.3.1/
[[email protected] CDH6.3.1]# yum install -y httpd
Loaded plugins: fastestmirror
......
Dependency Installed:
  apr.x86_64 0:1.4.8-5.el7       apr-util.x86_64 0:1.5.2-6.el7  httpd-tools.x86_64 0:2.4.6-90.el7.centos
  mailcap.noarch 0:2.1.41-2.el7 

Complete!
[[email protected] CDH6.3.1]# ll
total 4118988
-rw-r--r--. 1 root root 2083878000 Dec  5 22:05 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel
-rw-r--r--. 1 root root         40 Dec  5 22:06 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1
drwxrwxr-x. 5 2001 2001         75 Sep 25 16:51 cm6.3.1
-rw-r--r--. 1 root root 1411444147 Dec  5 22:06 cm6.3.1-redhat7.tar.gz
-rw-r--r--. 1 root root  173271626 Dec  5 22:07 jdk-8u45-linux-x64.gz
-rw-r--r--. 1 root root      33887 Dec  5 22:07 manifest.json
-rw-r--r--. 1 root root  548193637 Dec  5 22:07 mysql-5.7.11-linux-glibc2.5-x86_64.tar.gz
-rw-r--r--. 1 root root    1007502 Dec  5 22:07 mysql-connector-java-5.1.47.jar
[[email protected] CDH6.3.1]# mkdir /var/www/html/cdh6_parcel
[[email protected] CDH6.3.1]# mv CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel /var/www/html/cdh6_parcel
[[email protected] CDH6.3.1]# mv CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha1 /var/www/html/cdh6_parcel/CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha
[[email protected] CDH6.3.1]# mv manifest.json /var/www/html/cdh6_parcel
[[email protected] CDH6.3.1]# ll /var/www/html/cdh6_parcel
total 2035080
-rw-r--r--. 1 root root 2083878000 Dec  5 22:05 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel
-rw-r--r--. 1 root root         40 Dec  5 22:06 CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel.sha
-rw-r--r--. 1 root root      33887 Dec  5 22:07 manifest.json
[[email protected] CDH6.3.1]# service httpd start
Redirecting to /bin/systemctl start httpd.service
[[email protected] html]# scp -r cdh6_parcel/ cdh6
[[email protected] html]# ll
total 0
drwxr-xr-x. 2 root root 131 Dec  7 16:08 cdh6
drwxr-xr-x. 2 root root 131 Dec  7 16:12 cdh6_parcel
[[email protected] html]#

web打开192.168.1.31/cdh6_parcel/,验证httpd启动结果

step 5. 选择存储库

step 6. 自动刷新页面,显示CDH

step 7. 安装Parcels

step 8. 检查群集

修复出现的问题

  1. 修复透明大页面(主、次)

    echo never > /sys/kernel/mm/transparent_hugepage/defrag
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    
  2. swappiness 设置(主、次)
    sysctl vm.swappiness=10
    echo 'vm.swappiness=10'>> /etc/sysctl.conf
    
  3. 修复Psycopg2版本较低(忽略)

step 9. 服务选择

step 10. 角色分配(Zookeeper必须为奇数)

step 11. 数据库设置,测试连接

step 12. 首次运行命令详细信息

step 13. 汇总

5.5 问题修复

  1. CM service 黄色报错

    解决办法:Suppress或根据需要修改Java内存大小,这里进行了修改

  2. Zookeeper 黄色报错

    解决方案:角色选择时,Zookeeper选择奇数个节点

  3. HDFS 黄色报错

    解决办法:Suppress

  4. 主机 黄色报错

    解决办法:主机名不要有大写字



参考文献:
1.保存markdown图片
2.修改Linux内核参数
3.B站若泽大数据
感写若泽大数据,感写J哥,感谢星星!
如有侵权,请联系本人,会立即删除(E-mail:[email protected])

原文地址:https://www.cnblogs.com/xianyuxianyuxian/p/12013159.html

时间: 2024-10-09 04:52:12

CDH6.3.1安装详细步骤(感写B站若泽大数据)的相关文章

PostgreSQL安装详细步骤(windows)

PostgreSQL安装:一.windows下安装过程安装介质:postgresql-9.1.3-1-windows.exe(46M),安装过程非常简单,过程如下:1.开始安装: 2.选择程序安装目录: 注:安装 PostgreSQL 的分区最好是 NTFS 格式的.PostgreSQL 首要任务是要保证数据的完整性,而 FAT 和 FAT32 文件系统不能提供这样的可靠性保障,而且 FAT 文件系统缺乏安全性保障,无法保证原始数据在未经授权的情况下被更改.此外,PostgreSQL 所使用的"

redis3.0.2 分布式集群安装详细步骤

redis3.0.2 分布式集群安装详细步骤 --(centos5.8 X64系统) 版本历史 时间 版本 说明 编写者 2015-06-5 1.0 redis3.0.2 分布式集群安装详细步骤 csc 一: redis cluster介绍篇 1:redis cluster的现状 目前redis支持的cluster特性(已亲测): 1):节点自动发现 2):slave->master 选举,集群容错 3):Hot resharding:在线分片 4):进群管理:cluster xxx 5):基于

Oracle11g安装详细步骤

Oracle11g安装详细步骤,详见附件↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

CentOS 6.5下Redis安装详细步骤

CentOS 6.5下Redis安装详细步骤 Redis简介: Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工作由VMware主持. redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合).zset(sorted set –有序集合)和hash(哈希类

linux/centos下安装nginx(rpm安装和源码安装)详细步骤

Centos下安装nginx rpm包                                                                                                                            www.169it.com 1 在nginx官方网站下载一个rpm包,下载地址是:http://nginx.org/en/download.html wget http://nginx.org/packages/c

elasticsearch kibana + 分词器安装详细步骤

elasticsearch kibana + 分词器安装详细步骤 一.准备环境 系统:Centos7 JDK安装包:jdk-8u191-linux-x64.tar.gz ES安装包:elasticsearch-7.2.0-linux-x86_64.tar.gz,下载地址 Kibana安装包:kibana-7.2.0-linux-x86_64.tar.gz,下载地址 IK分词器安装包:elasticsearch-analysis-ik-7.2.0.zip,下载地址 目前准备两个节点做节点规划,分别

Zabbix3.4安装详细步骤

Zabbix3.4安装的详细步骤 一.zabbix介绍 现在大多数公司都会用到监控软件,主流的监控软件就是Zabbix了,当然还会有Nagios等其他的软件: Zabbix简介: zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供柔软的通知机制以让系统管理员快速定位/解决存在的各种问题. zabbix 由2部分构成,zabbix server 与可选组件zabbix agent. zabb

oracle 11g R2 64位 安装详细步骤

(oracle 11g R2 64位 + PLSQLDeveloper安装说明以及PLSQL Developer+ ORCALE11-instantclient-basic-win32-11.2.0.1.0连接oracle 11g R2 64位详细步骤) 第一步: 准备工具 1.oracle 11g R2 64位安装包 2.PLSQL Developer v11.0.2.1766 官方中文版(内含PLSQL Developer安装程序.汉化程序.PLSQL Developer注册程序.PLSQL

Oracle 12c安装详细步骤,带截图

1,在官网上下载oracle的压缩文件,两个都要下载. 并两个同时选中解压在一个文件夹里面. 2,解压之后,如下图,点击setup.exe稍等一会儿 ,3,开始安装: 不选点击下一步,或者直接点击下一步,弹出提醒的会选是就可以了. 4,创建和配置数据库,直接点击下一步 5,默认桌面类,直接点击下一步 6,选中创建新的windows用户,用户名跟密码自己取,取个简单的比较好,容易记住.填好之后点击下一步,可能会弹框说你的口令跟规则的不一样, 直接点击是就行了. 7 这里的目录可以自定义,选一个内存