CDH 6.3离线安装

安装前准备

环境:
CDH 6.3
CentOS 7

1.修改主机名,配置hosts文件,将集群配置到hosts文件中

2.机器关闭防火墙

[root@cdh01 ~]# systemctl stop firewalld && systemctl disable firewalld && systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

3.机器之间root用户配置ssh免密登录

[root@cdh01 ~]# ssh-keygen -t rsa
[root@cdh01 ~]# cat ~/.ssh/id_rsa.pub >> authorized_keys
[root@cdh01 ~]# ssh localhost
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
[root@cdh01 ~]# vim /etc/ssh/sshd_config
PermitRootLogin yes
[root@cdh01 ~]# systemctl restart sshd
[root@cdh01 ~]# ssh localhost
Last login: Wed Oct  9 10:04:38 2019

所有机器执行以上操作后,将主节点的公钥复制到所有子节点的authorized_keys文件中即可。当然为了集群跳转方便,也可以将集群所有机器的公钥都复制一份。

4.机器之间配置时间同步

[root@cdh01 :~ ]# yum install ntp
[root@cdh01 :~ ]# vim /etc/ntp.conf
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server localhost1	###ntp时间同步地址
server localhost2	###ntp时间同步地址
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
[root@cdh01 :~ ]# systemctl start ntpd
[root@cdh01 :~ ]# systemctl status ntpd
[root@cdh01 :~ ]# systemctl enable ntpd

5.在cloudera manager server节点上安装MySQL
MySQL下载地址,下载什么版本自己根据情况决定,我这里下载的是mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar,里面包含所有安装MySQL需要的RPM包。

解压MySQL包
[root@cdh01 ~]# tar -xvf mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar -C .
mysql-community-libs-5.7.27-1.el7.x86_64.rpm
mysql-community-embedded-devel-5.7.27-1.el7.x86_64.rpm
mysql-community-libs-compat-5.7.27-1.el7.x86_64.rpm
mysql-community-devel-5.7.27-1.el7.x86_64.rpm
mysql-community-embedded-compat-5.7.27-1.el7.x86_64.rpm
mysql-community-common-5.7.27-1.el7.x86_64.rpm
mysql-community-client-5.7.27-1.el7.x86_64.rpm
mysql-community-server-5.7.27-1.el7.x86_64.rpm
mysql-community-test-5.7.27-1.el7.x86_64.rpm
mysql-community-embedded-5.7.27-1.el7.x86_64.rpm

先删除服务器上相关的依赖,否则安装会冲突
[root@cdh01 ~]# rpm -qa |grep mysql
[root@cdh01 ~]# rpm -qa |grep MySQL
[root@cdh01 ~]# rpm -qa |grep mariadb
mariadb-libs-5.5.60-1.el7_5.x86_64
[root@cdh01 ~]# rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 --nodeps
[root@cdh01 ~]# rpm -qa |grep mariadb

安装MySQL服务
[root@cdh01 ~]# rpm -i mysql-community-common-5.7.27-1.el7.x86_64.rpm
warning: mysql-community-common-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
[root@cdh01 ~]# rpm -i mysql-community-libs-5.7.27-1.el7.x86_64.rpm 
warning: mysql-community-libs-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
[root@cdh01 ~]# rpm -i mysql-community-client-5.7.27-1.el7.x86_64.rpm 
warning: mysql-community-client-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
[root@cdh01 ~]# rpm -i mysql-community-server-5.7.27-1.el7.x86_64.rpm 
warning: mysql-community-server-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

查看MySQL服务状态
[root@cdh01 ~]# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html

启动MySQL服务
[root@cdh01 ~]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值