目录
三、安装Cloudera Manager Server 和Agent
一、软件环境
NO. |
软件名称 |
版本 |
1 |
操作系统 |
CentOS6.8 64位 |
2 |
JDK |
1.8.0_73 |
3 |
Cloudera Manager |
5.15.1 |
4 |
CDH |
5.15.1 |
5 |
数据库 |
MySQL5.7 |
6 |
JDBC驱动 |
5.1.40 |
二、安装前准备
2.1配置网络名称(hostname)
(1)编辑/etc/sysconfig/network文件,修改HOSTNAME
[root@kms-1 ~]# vi /etc/sysconfig/network |
如下图所示将主机名修改为kms-1.example.com
(2)编辑/etc/hosts文件,配置主机IP与主机名
[root@kms-1 ~]# vi /etc/hosts |
配置的内容如下图所示
(3)对其他主机做上述相同操作
2.2配置SSH免密登录
(1)执行 ssh-keygen -t rsa命令,生成密钥
[root@kms-1 ~]# ssh-keygen -t rsa |
输入命令之后,连续按四次回车键,如下图所示
(2)执行ssh-copy-id命令
[root@kms-1 ~]# ssh-copy-id kms-1.example.com [root@kms-1 ~]# ssh-copy-id kms-2.example.com [root@kms-1 ~]# ssh-copy-id kms-3.example.com |
首先免密登录本地
然后免密登录其他主机
(3)在其他主机执行上述相同操作
2.3集群时间同步
(1)安装ntp,如果操作系统已经安装了,可以不用再安装
[root@kms-1 ~]# yum install -y ntp |
(2)设置ntp开机启动
[root@kms-1 ~]# chkconfig ntpd on |
(3)检查是否设置成功
[root@kms-1 ~]# chkconfig --list ntpd |
如下图所示表示设置成功
(4)在其他主机上执行上述步骤
(5)主节点ntpserver配置
[root@kms-1 ~]# vi /var/lib/ntp/drift restrict 127.0.0.1 restrict -6 ::1 restrict default nomodify notrap server 202.120.2.101 prefer includefile /etc/ntp/crypto/pw keys /etc/ntp/keys |
(6)启动主节点ntp服务
[root@kms-1 ~]# service ntpd start |
(7)执行ntpstat命令查看同步状态
[root@kms-1 ~]# ntpstat |