CDH6.3.1离线安装(内含安装包)

一、安装前准备

1、安装包

链接:https://pan.baidu.com/s/1drZV1CtUn8h3DHt6wjeVvw?pwd=1234
提取码:1234

image.png

2、服务器准备

2.1 配置host

相互访问都用配置的host进行访问
所有机器使用同一个配置

[root@gy-dev-app ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.192.33.2 cdh01 master
10.192.33.1 cdh02
10.192.33.3 cdh03

2.2 各服务器时间同步(不同步会出错)

内网就以一台服务器作为时间服务器,其他机器去同步即可
通互联网的可直接同步互联网时间
配置时间同步

[root@gy-dev-app ~]# systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-10-18 18:16:17 CST; 6 months 8 days ago
  Process: 9460 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 9500 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─9500 /usr/sbin/ntpd -u ntp:ntp -g

Oct 18 18:16:16 gy-dev-app ntpd[9500]: Listen normally on 3 lo ::1 UDP 123
Oct 18 18:16:16 gy-dev-app ntpd[9500]: Listening on routing socket on fd #20 for interface updates
Oct 18 18:16:16 gy-dev-app ntpd[9500]: 0.0.0.0 c016 06 restart
Oct 18 18:16:16 gy-dev-app ntpd[9500]: 0.0.0.0 c012 02 freq_set kernel -2.197 PPM
Oct 18 18:16:17 gy-dev-app systemd[1]: Started Network Time Service.
Oct 18 18:16:20 gy-dev-app ntpd[9500]: Listen normally on 4 ens192 fe80::250:56ff:feb5:fffa UDP 123
Oct 18 18:16:20 gy-dev-app ntpd[9500]: new interface(s) found: waking up resolver
Oct 18 18:16:22 gy-dev-app ntpd[9500]: Listen normally on 5 ens192 10.192.33.2 UDP 123
Oct 18 18:16:22 gy-dev-app ntpd[9500]: new interface(s) found: waking up resolver
Oct 18 18:16:29 gy-dev-app ntpd[9500]: 0.0.0.0 c615 05 clock_sync

要是没有启动启动就好了

systemctl start ntpd
#修改配置
vim /etc/ntp.conf
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
#当外部时间不可用时,可使用本地硬件时间
#server 127.127.1.0 iburst local clock
##允许哪些网段的机器来同步时间
#restrict 172.21.230.0 mask 255.255.255.0 nomodify notrap
[root@gy-dev-app ~]# systemctl restart ntpd
[root@gy-dev-app ~]# systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2022-04-27 10:09:33 CST; 10s ago
  Process: 39382 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 39383 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─39383 /usr/sbin/ntpd -u ntp:ntp -g

Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listen normally on 3 ens192 10.192.33.2 UDP 123
Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listen normally on 4 lo ::1 UDP 123
Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listen normally on 5 ens192 fe80::250:56ff:feb5:fffa UDP 123
Apr 27 10:09:33 gy-dev-app ntpd[39383]: Listening on routing socket on fd #22 for interface updates
Apr 27 10:09:33 gy-dev-app ntpd[39383]: 0.0.0.0 c016 06 restart
Apr 27 10:09:33 gy-dev-app ntpd[39383]: 0.0.0.0 c012 02 freq_set kernel 10.244 PPM
Apr 27 10:09:42 gy-dev-app ntpd[39383]: 0.0.0.0 c615 05 clock_sync

其他机器新增配置

server cdh01
#重启并开启开机启动
systemctl restart ntpd
systemctl enable ntpd.service
#查看是否启用
ntpstat
ntpq -p

2.3 关闭所有机器防火墙

#SELINUX 默认也是关闭的 ,可以看配置 /etc/selinux/config
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
setenforce 0
systemctl stop firewalld
systemctl disable firewalld

2.4服务器免密访问配置


[root@gy-dev-app ~]# ssh-keygen -t rsa
#直接几个回车
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:wBKiw/5UVDw700ACNdpAsAcsh7xsRu+4hRFrgRqtQNk root@gy-dev-app
The key's randomart image is:
+---[RSA 2048]----+
|=**++=+o         |
|BO=E=oo+         |
|O**o.oo =        |
|+X.... = .       |
|+.=.    S        |
| ooo             |
|  o.             |
| .               |
|                 |
+----[SHA256]-----+
#秘钥copy到目标服务器
[root@gy-dev-app ~]# ssh-copy-id cdh02
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@cdh02's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'cdh02'"
and check to make sure that only the key(s) you wanted were added.

[root@gy-dev-app ~]# ssh 'cdh02'
#直接登录了
Last failed login: Wed Apr 27 10:47:03 CST 2022 from cdh01 on ssh:notty
There were 3 failed login attempts since the last successful login.
Last login: Wed Apr 27 09:26:37 2022 from 10.190.1.70

切换主机(输入~ 然后 crl + z)

[root@gy-dev-db ~]# ~^Z [suspend ssh]

[2]+  Stopped                 ssh 'cdh03'
2.5MySQL安装
mkdir mysql5
tar -xvf mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar -C mysql5/
cd mysql5
rm mysql-community-embedded-* -f
rm mysql-community-test-5.7.27-1.el7.x86_64.rpm  -f
#仅保留
#mysql-community-client-5.7.27-1.el7.x86_64.rpm
#mysql-community-common-5.7.27-1.el7.x86_64.rpm
#mysql-community-devel-5.7.27-1.el7.x86_64.rpm
#mysql-community-libs-5.7.27-1.el7.x86_64.rpm
#mysql-community-libs-compat-5.7.27-1.el7.x86_64.rpm
#mysql-community-server-5.7.27-1.el7.x86_64.rpm
rpm -Uvh --force --nodeps *rpm
systemctl start mysqld
systemctl enable mysqld
grep password /var/log/mysqld.log 
#2022-04-27T05:25:35.748214Z 1 [Note] A temporary password is generated for root@localhost: lN6A%AwgZ>/t00
uninstall plugin validate_password;#可设置简单密码了
alter user 'root'@'localhost' identified by 'root';
CREATE DATABASE cmf CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
CREATE DATABASE hive CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
CREATE DATABASE monitor CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
grant all privileges on cmf.* to 'cmf'@'%'identified by 'cmf';
grant all privileges on *.* to 'root'@'cdh01'identified by 'cdh01' with grant option;
grant all privileges on hive.* to 'hive'@'%'identified by 'hive';
grant all privileges on monitor.* to'monitor'@'%' identified by 'monitor';

CREATE DATABASE hue CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
grant all privileges on hue.* to 'hue'@'%'identified by 'hue';
CREATE DATABASE oozie CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
grant all privileges on oozie.* to 'oozie'@'%'identified by 'oozie';

复制mysql连接驱动

cp mysql/mysql-connector-java-5.1.48.jar /usr/share/java
cd /usr/share/java
mv mysql-connector-java-5.1.48.jar mysql-connector-java.jar#去掉版本号

安装

rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --force

安装完后修改db配置

# 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=master

# 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=cmf

# 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=INIT
com.cloudera.cmf.db.setupType=EXTERNAL
vim /etc/cloudera-scm-agent/config.ini 
修改如下
[General]
# Hostname of the CM server.
server_host=master

添加parcel源

  cp parcel/CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel /opt/cloudera/parcel-repo/
  cp parcel/CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha1 /opt/cloudera/parcel-repo/
  cp parcel/manifest.json /opt/cloudera/parcel-repo/

从节点

rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --force

启动

systemctl start cloudera-scm-server
systemctl start cloudera-scm-agent
#发现报错
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 1 milliseconds ago.  The last packet sent successfully to the server was 1 milliseconds ago.
        at sun.reflect.GeneratedConstructorAccessor46.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
        at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:201)
        at com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4869)
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1656)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1217)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2189)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)
        at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:768)
        at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
        at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)
        at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:146)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:195)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:184)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
        at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
        at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
        at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:648)
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
        at sun.security.ssl.HandshakeContext.(HandshakeContext.java:171)
        at sun.security.ssl.ClientHandshakeContext.(ClientHandshakeContext.java:106)
        at sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:405)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:384)
        at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:186)
        ... 23 more
vim /usr/java/jdk1.8.0_331-amd64/jre/lib/security/java.security
# 删除SSLv3, TLSv1, TLSv1.1
jdk.tls.disabledAlgorithms=RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
    include jdk.disabled.namedCurves

重启后,访问7180端口

image.png

继续,选择免费


image.png

image.png

居然没有找到CDH

#后缀改一下
 mv CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha1 CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha
 parcel-repo]# systemctl restart cloudera-scm-server
image.png

image.png

等待安装
后面还有不少安装,没截图,还会报错,遇到就百度吧

安装完可以登录了(admin/admin)


image.png

参考:
https://ifantasy.blog.csdn.net/article/details/119942308
https://ifantasy.blog.csdn.net/article/details/119942372#comments_18125560

你可能感兴趣的:(CDH6.3.1离线安装(内含安装包))