使用Ambari部署hadoop集群
2018-06-25 本文已影响83人
哥别打脸
使用Ambari部署hadoop集群
-
ambari版本是 2.6.2.2
-
三台机器
ip | host | 系统 | ambari-server | 内存 | 硬盘 |
---|---|---|---|---|---|
192.168.9.210 | node0 | centos7 | ambari-server | 6G | 120G |
192.168.9.211 | node1 | centos7 | ambari-agent | 6G | 120G |
192.168.9.212 | node2 | centos7 | ambari-agent | 6G | 120G |
- 参考文档
https://cwiki.apache.org/confluence/display/AMBARI/Start+Guide+Using+Centos+6.x
https://www.ibm.com/developerworks/cn/opensource/os-cn-bigdata-ambari/index.html
配置host文件##
修改node0节点上的etc/hosts内容,并将这个hosts文件分发到每个节点
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.9.210 node0
192.168.9.211 node1
192.168.9.212 node2
192.168.9.213 node3
设置ssh免密码登录##
ambari-server安装在node0机器上,要确保node0可以ssh登录到其他机器,原理是将node0机器上的公钥拷贝到node1,node2等节点上。
在node0机器上执行:
ssh-keygen -t rsa
ssh-copy-id root@node0
ssh-copy-id root@node1
ssh-copy-id root@node2
下载 ambari的 仓库文件
wget http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.2/ambari.repo
mv ambari.repo /etc/yum.repos.d/
在node0节点上安装ambari-server##
yum install ambari-server

ambari setup##
注意jdk一定要选择1.8,因为最新版2.6有部分组件是用1.8编译的。
ambari-server setup

ambari start##
ambari-server start

启动成功后打开地址:http://192.168.9.210:8080
默认用户名密码是admin admin

部署hadop2.X集群##
ambari安装启动完成后,就可以通过ambari简单的设置创建一个hadoop集群了
1、命名hadoop集群的名字###

2、选择hadoop的生态圈,这里选择hdp-2.6.5.0###

confirm hosts###

choose services

review

install start and Test###
这个过程相对时间较长,试网络情况需要半天到一天时间

安装完成后###

可能遇到的问题##
-
在创建集群的最后一步报ambari No more mirrors to try.
yum clean all yum makecache
-
在创建集群最后一步报 Python script has been killed due to timeout after waiting 1800 secs
修改 /etc/ambari-server/conf/ambari.properties,将下面的默认的超时时间改大agent.package.install.task.timeout=1800