因为要安装一些其他的服务需要本机有hdp的client及集群的配置信息,方便其他服务调用。
配置hosts
#增减192.168.31.64 client1.work.com与192.168.31.249 client2.work.com
[root@ambari ~]# vim /etc/hosts
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.31.62 ambari
192.168.31.105 name1.work.com
192.168.31.106 name2.work.com
192.168.31.107 node1.work.com
192.168.31.108 node2.work.com
192.168.31.109 node3.work.com
192.168.31.64 client1.work.com
192.168.31.249 client2.work.com
#同步
[root@ambari ~]# scp /etc/hosts 192.168.31.105:/etc/
hosts 100% 471 341.8KB/s 00:00
[root@ambari ~]# scp /etc/hosts 192.168.31.106:/etc/
hosts 100% 471 349.2KB/s 00:00
[root@ambari ~]# scp /etc/hosts 192.168.31.107:/etc/
hosts 100% 471 353.2KB/s 00:00
[root@ambari ~]# scp /etc/hosts 192.168.31.108:/etc/
hosts 100% 471 54.4KB/s 00:00
[root@ambari ~]# scp /etc/hosts 192.168.31.109:/etc/
hosts 100% 471 316.1KB/s 00:00
[root@ambari ~]# scp /etc/hosts 192.168.31.64:/etc/
hosts 100% 471 1.5MB/s 00:00
[root@ambari ~]# scp /etc/hosts 192.168.31.249:/etc/
hosts
[root@ecs-hdp2 ~]# hostnamectl set-hostname client2.work.com
[root@ecs-hdp ~]# hostnamectl set-hostname client1.work.com
#配置免密,在ambari管理节点执行
[root@ambari ~]# ssh-copy-id 192.168.31.64
[root@ambari ~]# ssh-copy-id 192.168.31.249
#配置yum源
[root@ecs-hdp ~]# cat /etc/yum.repos.d/ambari.repo
#VERSION_NUMBER=2.6.2.2-1
[ambari-2.6.2.2]
name=ambari Version - ambari-2.6.2.2
baseurl=http://192.168.31.105:18018/ambari-2.6.2.2
gpgcheck=0
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.2/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
通过ambari控制台增加集群主机: 依次点击 顶部右侧--> hosts --> actions -- > add new hosts --> 输入target hosts的主机名-->配置ssh private key --> confirm --> next
这里安装失败处理如下:
#增加force_https_protocol=PROTOCOL_TLSv1_2
[root@ecs-hdp ~]# vim /etc/ambari-agent/conf/ambari-agent.ini
[security]
force_https_protocol=PROTOCOL_TLSv1_2
[root@ecs-hdp ~]# vi /etc/python/cert-verification.cfg
[https]
#verify=platform_default
verify=disable
#再次retry节点加入集群成功