基于ubuntu16.04搭建Ambari集群

基于ubuntu16.04搭建Ambari集群

从10月10号接触Ambari到现在为止,刚好14天吧(两个星期)

 网上的安装方法一大堆,但是必须要找到适合你的,否则很难安装成功的。所以我将题目定为:基于ubuntu16.04搭建Ambari集群。

一、修改域名

dthost001(样例)
root@DTHost001:/home/dtmanager# vim /etc/hosts
127.0.0.1       localhost
# The following lines are desirable for IPv6 capable hosts
::1     localhost       ip6-localhost   ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
内网ip   dthost002
外网ip    dthost001       dthost001
外网ip  dthost002       dthost002
内网ip   dthost001


dthost002(样例)
root@DTHost002:~# vim /etc/hosts
127.0.0.1       localhost
# The following lines are desirable for IPv6 capable hosts
::1     localhost       ip6-localhost   ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
内网ip   dthost002
外网ip    dthost001       dthost001
外网ip  dthost002       dthost002
内网ip   dthost001

 

二、在root用户中配置ssh免密钥登录

使用ssh-copy-id是配置免密钥登录最快的方法

(在两台云主机中同时执行)
ssh-keygen
ssh-copy-id 云主机1外网IP
ssh-copy-id 云主机2外网IP
(测试)
ssh root@dthost001 
ssh root@dthost002
(退出)
exit 

 

三、安装

转换到root下执行下面命令,下面提供一种在线安装方法

选定一台云主机作为master,另一台作为slave(以下命令除第6条外,只需要在master主机中执行即可)

cd /etc/apt/sources.list.d
wget http://public-repo-1.hortonworks.com/ambari/ubuntu16/2.x/updates/2.5.2.0/ambari.list
apt-key adv –recv-keys –keyserver keyserver.ubuntu.com B9733A7A07513CAD
apt-get update
apt-get install ambari-server
apt-get install ambari-agent(在master和slave两台机器中都要执行)
apt-get install ambari-metrics-assembly

其它安装方法请参考http://www.voidcn.com/article/p-nxtxngvc-bpy.html?tdsourcetag=s_pctim_aiomsg

 

四、设置和启动

设置只需要使用默认即可

ambari-server setup 
ambari-server start

 

五、修改阿里云端口

阿里云主机可能对部分端口无法访问,例如8080端口就无法访问,所以需要到阿里云控制平台中去开启端口权限。详情请参考如下链接。https://blog.csdn.net/KascLiyuan/article/details/73438093

 

六、登录图形化界面,做初始化设置

登录    公网ip:8080
账号    admin
密码    admin

其中配置端口那一步骤最容易失败的,要填写主机名称

后面的步骤使用默认即可。反正我在上面花了不少时间,祝各位安装ambari的时候好运连连。最后祝各位同行程序员节快乐。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值