【原创】hadoop集群监控工具ambari安装

  Apache Ambari是对Hadoop进行监控、管理和生命周期管理的开源项目。它也是一个为Hortonworks数据平台选择管理组建的项目。Ambari向Hadoop MapReduce、HDFS、 HBase、Pig, Hive、HCatalog以及Zookeeper提供服务。最近准备装ambari,在网上找了许久,没找到比较系统的ambari安装过程,于是,就根据官网进行了安装,下面是我推荐的正确的较完善的安装方式,希望对大家有所帮助。

  一、准备工作

  1、系统:我的系统是CentOS6.2,x86_64,本次集群采用两个节点。管理节点:192.168.10.121;客户端节点:192.168.10.122

  2、系统最好配置能上网,这样方便后面的操作,否则需要配置yum仓库,比较麻烦。

  3、集群中ambari-serveer(管理节点)到客户端配置无密码登录。

  4、集群同步时间

  5、SELinux,iptables都处于关闭状态。

  6、ambari版本:1.2.0

  二、安装步骤

  A、配置好集群环境

############  配置无密码登录  #################
[root@ccloud121 ~]# ssh-keygen -t dsa
[root@ccloud121 ~]# cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
[root@ccloud121 ~]# scp /root/.ssh/id_dsa.pub 192.168.10.122:/root/
[root@ccloud121 ~]# ssh 192.168.10.122
[root@ccloud122 ~]# cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys

#############  NTP 时间同步  #################
[root@ccloud121 ~]# ntpdate time.windows.com
[root@ccloud121 ~]# ssh ccloud122 ntpdate time.windows.com

###########  SELinux & iptables 关闭   ###########
[root@ccloud121 ~]# setenforce 0
[root@ccloud121 ~]# ssh ccloud122 setenforce 0
[root@ccloud121 ~]# chkconfig iptables off
[root@ccloud121 ~]# service iptables stop
[root@ccloud121 ~]# ssh ccloud122 chkconfig iptables off
[root@ccloud121 ~]# ssh ccloud122 service iptables stop

  B、管理节点上安装ambari-server

    1、下载repo文件     

[root@ccloud121 ~]# wget http://public-repo-1.hortonworks.com/AMBARI-1.x/repos/centos6/ambari.repo

[root@ccloud121 ~]# cp ambari.repo /etc/yum.repos.d

    这样,ambari-server的yum仓库就做好了。

    2、安装epel仓库

 

[root@ccloud121 ~]# yum install epel-release 

# 查看仓库列表,应该有HDP,EPEL
[root@ccloud121 ~]# yum repolist

    3、通过yum安装amabari bits,这同时也会安装PostgreSQL

[root@ccloud121 ~]# yum install ambari-server

     这个步骤要等一会,它需要上网下载,大概39M左右。

    4、运行ambari-server setup,安装ambari-server,它会自动安装配置PostgreSQL,同时要求输入用户名和密码,如果按n,它用默认的用户名/密码值:ambari-server/bigdata。接着就开始下载安装JDK。安装完成后,ambari-server就可以启动了。

  三、集群启动

    

    1、直接接通过ambari-server start和amabari-server stop即可启动和关闭ambari-serveer。

    2、启动成功后,在浏览器输入http://192.168.10.121:8080

    界面如下图所示:

    

登录名和密码都是admin。

这样就可以登录到管理控制台。

    3、集群的安装配置按照步骤一步步做,在ssh private key里选择/etc/.ssh/id_rsa这个文件,但是我在注册节点时出现了个问题:

('INFO 2013-03-06 10:37:42,580 NetUtil.py:58 - Failed to connect to https://180.168.41.175:8440/cert/ca due to [Errno 111] Connection refused
INFO 2013-03-06 10:37:42,580 NetUtil.py:77 - Server at https://180.168.41.175:8440 is not reachable,

这个问题始终得不到解决,安装无法继续下去,网上也找不到解决方案,希望看到这篇博文的高手朋友们,能提供些解决方案,在此先谢谢了。

  四、备注

  ambari源码:http://svn.apache.org/repos/asf/incubator/ambari/tags/

  原文出处:http://www.cnblogs.com/caoyuanzhanlang

  

草原战狼淘宝小店:http://xarxf.taobao.com/ 淘宝搜小矮人鞋坊,主营精致美丽时尚女鞋,为您的白雪公主挑一双哦。谢谢各位博友的支持。

==========================================================================================================

  ===================================    以上分析仅代表个人观点,欢迎指正与交流   ===================================

  ===================================    尊重劳动成果,转载请注明出处,万分感谢   ===================================

  ==========================================================================================================

  

posted @ 2013-03-06 11:14  草原战狼  阅读(10229)  评论(10编辑  收藏  举报
草原战狼淘宝小店

No one indebted for others,while many people don't know how to cherish others.

No one indebted for others,while many people don't know how to cherish others.

Don‘t cry because it is over, smile because it happened.

Don‘t try so hard, the best things come when you least expect them to.