前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用Ambari安装hadoop集群

使用Ambari安装hadoop集群

作者头像
魏守峰
发布2018-04-28 15:45:07
1.3K0
发布2018-04-28 15:45:07
举报
文章被收录于专栏:点滴积累点滴积累

      最近需要做些spark的工作,所以弄了几台dell7500就这么准备开始搭建集群,之前用过几台更破的台式机搭建过一次,折腾了半个月之久,终于成功搭建,这次不想走老路,所以网上查了一下,发现一个神器AMBARI,可以部署、管理集群,果然是个好东西,所以就拿来用,但是在安装的过程中碰到了许许多多的问题,所以现在把安装过程总结一下,放到这里,以方便下次安装或者其他有对ambari感兴趣的同学可以参考之。

      安装过程大量查阅了网上的相关资料,主要是https://cwiki.apache.org/confluence/display/AMBARI/Install+Ambari+2.2.0+from+Public+Repositories和http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_Installing_HDP_AMB/bk_Installing_HDP_AMB-20151221.pdf,大家也可以直接参考这两篇文章来进行安装,其余的一些细节我直接写在本文里。

  安装Ubuntu服务器,在这里就不做说明了,目前比较合适的版本应该是14.04,可以直接在官网上下载然后用u盘做个启动盘,直接安装即可。

  安装集群主要分以下几步: 1、安装ambari(参考https://cwiki.apache.org/confluence/display/AMBARI/Install+Ambari+2.2.0+from+Public+Repositories) cd /etc/apt/sources.list.d sudo wget http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.0.0/ambari.list sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD sudo apt-get update sudo apt-get install ambari-server sudo ambari-server setup sudo ambari-server start 可以先设置下一步的root用户,这样不需要sudo 2、启用root用户 sudo passwd root 输入密码 然后 sudo vim /etc/ssh/sshd_config 注释掉PermitRootLogin with。。。 添加PermitRootLogin yes 然后重启服务 sudo service ssh restart 3、配置hosts vim /etc/hosts 添加 192.168.1.201   host01 192.168.1.202   host02

注意不要删除以下两行,否则会出问题

127.0.0.1       localhost

::1     localhost ip6-localhost ip6-loopback

每台服务器上均需要设置

4、配置静态IP、DNS

vim /etc/network/interfaces

修改成如下格式

auto lo  

iface lo inet loopback  

auto eth0  

iface eth0 inet static  

address 192.168.2.101  

netmask 255.255.255.0  

gateway 192.168.2.1   

dns-nameservers 111.111.111.111

5、配置ntp(时间同步服务器) apt-get install ntp  每台服务器上均需要安装 6、免密码登陆 server 到 客户端 ssh-keygen -t rsa ssh-copy-id -i host01 ssh-copy-id -i host02 将root/.ssh/id_rsa下载到本地,以供上传 7、禁用Transparent Huge Pages Edit the grub configuration file present in /etc/default/grub and add transparent_hugepage=never to the GRUB_CMDLINE_LINUX_DEFAULT if other options are already present in this line then simply put a space and transparent_hugepage=never GRUB_CMDLINE_LINUX_DEFAULT=”transparent_hugepage=never” Save and then on the terminal run “sudo update-grub”

每台服务器上均需要设置 8、配置注意事项 填写hostname的时候直接写host host001

host002

其余均按照自己需求选择

本文介绍的是Ubuntu服务器,如果需要在其他平台中安装,只需要简单修改即可。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2016-01-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档