码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-12-09 21:49:05      阅读:559      评论:0      收藏:0      [点我收藏+]

标签:auto   emc   参考   source   lips   glibc   recovery   debuginfo   defaults   

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 创建用户组及用户

[root@cdh-server01 local]# groupadd -g 101 dba
[root@cdh-server01 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.
[root@cdh-server01 local]# cp /etc/skel/.* /usr/local/mysql
cp: omitting directory ‘/etc/skel/.’
cp: omitting directory ‘/etc/skel/..’
[root@cdh-server01 local]# vi mysql/.bashrc
添加
    export MYSQL_BASE=/usr/local/mysql
    export PATH=${MYSQL_BASE}/bin:$PATH
[root@cdh-server01 local]# chown  mysqladmin:dba /etc/my.cnf
[root@cdh-server01 local]# chmod  640 /etc/my.cnf  
[root@cdh-server01 local]# chown -R mysqladmin:dba /usr/local/mysql
[root@cdh-server01 local]# chmod -R 755 /usr/local/mysql 
[root@cdh-server01 local]# cd /usr/local/mysql
[root@cdh-server01 mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysql
[root@cdh-server01 mysql]# chmod +x /etc/rc.d/init.d/mysql
[root@cdh-server01 mysql]# chkconfig --add mysql
[root@cdh-server01 mysql]# bin/mysqld --defaults-file=/etc/my.cnf --user=mysqladmin --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --initialize
[root@cdh-server01 mysql]# cd data
[root@cdh-server01 data]# cat hostname.err |grep password
2019-12-06T14:24:59.548965Z 1 [Note] A temporary password is generated for root@localhost: r4jSaWdRd;yq
[root@cdh-server01 data]# su - mysqladmin
[mysqladmin@cdh-server01 ~]$ service mysql start
Starting MySQL... SUCCESS! 
[mysqladmin@cdh-server01 ~]$ 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
[mysqladmin@cdh-server01 ~]$ 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 root@localhost 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
[mysqladmin@cdh-server01 ~]$ service mysql restart
Shutting down MySQL.. SUCCESS! 
Starting MySQL.. SUCCESS! 
[mysqladmin@cdh-server01 ~]$ 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
[mysqladmin@cdh-server01 ~]$ exit;
logout
[root@cdh-server01 data]# cd
[root@cdh-server01 ~]# cd CDH6.3.1/
[root@cdh-server01 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
[root@cdh-server01 CDH6.3.1]# mkdir -p /usr/share/java
[root@cdh-server01 CDH6.3.1]# cp mysql-connector-java-5.1.47.jar  /usr/share/java/mysql-connector-java.jar
[root@cdh-server01 CDH6.3.1]# 

5. rpm包部署CM

5.1 主节点

[root@cdh-server01 CDH6.3.1]# tar -xzvf cm6.3.1-redhat7.tar.gz
[root@cdh-server01 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
[root@cdh-server01 CDH6.3.1]# cd cm6.3.1
[root@cdh-server01 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
[root@cdh-server01 cm6.3.1]# cd RPMS/
[root@cdh-server01 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
[root@cdh-server01 RPMS]# cd x86_64/
[root@cdh-server01 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
[root@cdh-server01 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%]
[root@cdh-server01 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.
[root@cdh-server01 x86_64]# cd
[root@cdh-server01 ~]# cd /etc/cloudera-scm-server/
[root@cdh-server01 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
[root@cdh-server01 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
[root@cdh-server01 cloudera-scm-server]# service cloudera-scm-server start
Redirecting to /bin/systemctl start cloudera-scm-server.service
[root@cdh-server01 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.
[root@cdh-server01 cloudera-scm-server]# 
    # 此处启动一个新的主节点窗口,检查cloudera-scm-server服务启动日志
    # 出现7180,则证明成功,否则检查log文件,寻找问题
    # 网页打开192.168.1.31:7180,维持不动
    [root@cdh-server01 ~]# cd /var/log/cloudera-scm-server/
    [root@cdh-server01 cloudera-scm-server]# ll
    total 0
    [root@cdh-server01 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
    [root@cdh-server01 cloudera-scm-server]# tail -F cloudera-scm-server.log 
    2019-12-07 15:00:39,657 INFO WebServerImpl:org.eclipse.jetty.server.AbstractConnector: Started ServerConnector@16a3e60{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/
[root@cdh-server01 cloudera-scm-server]#
[root@cdh-server01 cloudera-scm-server]# cd
[root@cdh-server01 CDH6.3.1]# cd CDH6.3.1/cm6.3.1/RPMS/x86_64/
[root@cdh-server01 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.
[root@cdh-server01 x86_64]# vi /etc/cloudera-scm-agent/config.ini
# 修改
    server_host=cdh-server01
[root@cdh-server01 x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent01:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent02:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent03:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent04:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cdh-agent05:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent01:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent02:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent03:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent04:/root/CDH6.3.1/
[root@cdh-server01 x86_64]# scp cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cdh-agent05:/root/CDH6.3.1/
[root@cdh-server01 x86_64]#

5.2 次节点

[root@cdh-agent01 java]# cd /root/CDH6.3.1/
You have new mail in /var/spool/mail/root
[root@cdh-agent01 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
[root@cdh-agent01 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%]
[root@cdh-agent01 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.
[root@cdh-agent01 CDH6.3.1]# vi /etc/cloudera-scm-agent/config.ini
# 修改
    server_host=cdh-server01

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

[root@cdh-server01 x86_64]# service cloudera-scm-agent start
Redirecting to /bin/systemctl start cloudera-scm-agent.service
[root@cdh-agent01 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.
[root@cdh-agent01 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!
[root@cdh-server01 x86_64]# 

5.4 web页面配置信息

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

技术图片

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

技术图片

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

技术图片

step 4. 指定主机

技术图片

step 5. 准备parcel(主)

[root@cdh-server01 x86_64]# cd
[root@cdh-server01 ~]# cd CDH6.3.1/
[root@cdh-server01 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!
[root@cdh-server01 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
[root@cdh-server01 CDH6.3.1]# mkdir /var/www/html/cdh6_parcel
[root@cdh-server01 CDH6.3.1]# mv CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel /var/www/html/cdh6_parcel
[root@cdh-server01 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
[root@cdh-server01 CDH6.3.1]# mv manifest.json /var/www/html/cdh6_parcel
[root@cdh-server01 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
[root@cdh-server01 CDH6.3.1]# service httpd start
Redirecting to /bin/systemctl start httpd.service
[root@cdh-server01 html]# scp -r cdh6_parcel/ cdh6
[root@cdh-server01 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
[root@cdh-server01 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:qibin1024@qq.com)

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

标签:auto   emc   参考   source   lips   glibc   recovery   debuginfo   defaults   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!