hadoop集群监控工具Ambari安装

来源:互联网 发布:淘宝图片空间在哪里找 编辑:程序博客网 时间:2024/04/28 02:04

本文通过查阅互联网上现存关于Ambari安装与使用 教程并通过实践,对此过程的记录与补充而来,希望会对您有所帮助:) 


Apache Ambari是对Hadoop进行监控、管理和生命周期管理的开源项目。它也是一个为Hortonworks数据平台选择管理组建的项目。Ambari向Hadoop MapReduce、HDFS、 HBase、Pig, Hive、HCatalog以及Zookeeper提供服务。

一、准备工作

  1、系统:我的系统是CentOS6.3,x86_64,本次集群采用4个节点。管理节点:192.168.1.70;客户端节点:192.168.1.71,192.168.1.72,192.168.1.73

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

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

  4、集群同步时间

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

  6、ambari版本:1.2.0

二、安装步骤

A、配置基础集群环境

01############  配置无密码登录[已配置集群ssh请忽略此项]  #################
02[root@Master ~]# ssh-keygen -t rsa
03[root@Master ~]# cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
04[root@Master ~]# scp /root/.ssh/id_dsa.pub 192.168.1.71:/root/
05[root@Master ~]# ssh 192.168.1.71
06[root@Slave1 ~]# cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
07 
08#############  NTP 时间同步  #################
09[root@Master ~]# ntpdate time.windows.com
10[root@Master ~]# ssh 192.168.1.71 ntpdate time.windows.com
11 
12###########  SELinux & iptables 关闭   ###########
13[root@Master ~]# setenforce 0
14[root@Master ~]# ssh 192.168.1.71 setenforce 0
15[root@Master ~]# chkconfig iptables off
16[root@Master ~]# service iptables stop
17[root@Master ~]# ssh 192.168.1.71 chkconfig iptables off
18[root@Master ~]# ssh 192.168.1.71 service iptables stop
19 
20# 以上仅列出一个配置实例,其他节点的操作也按照:192.168.1.71(<span></span>Slave1)方法 #

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

1、下载repo文件 

1[root@Master ~]# wget http://public-repo-1.hortonworks.com/AMBARI-1.x/repos/centos6/ambari.repo
2[root@Master ~]# cp ambari.repo /etc/yum.repos.d


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

2、安装epel仓库

1# 注:在安装过程中需要确认操作,都选择y
2[root@Master ~]# yum install epel-release
3 
4# 查看仓库列表,应该有HDP,EPEL
5[root@Master ~]# yum repolist
3、通过yum安装amabari bits,这同时也会安装PostgreSQL 
1[root@Master ~]# yum install ambari-server
     这个步骤要等一会,它需要上网下载,大概39M左右。

4、安装ambari-server 

1[root@Master ~]# ambari-server setup –j /my/jdk/home


指定本机jdk路径并自动安装配置PostgreSQL,同时要求输入用户名和密码,如果按n,它用默认的用户名/密码值:ambari-server/bigdata。安装完成后,ambari-server就可以启动了(命令:ambari-server start)。

注: 如果使用不带参数的命令[ambari-server setup]运行,会默认下载oracle-jdk-1.6,按理说,我们既然已经搭建好了hadoop集群,那在搭建hadoop集群前jdk就是必须的,所以此处应该指定本机jdk安装路径,以免多此一举。

三、集群启动

1、直接接通过ambari-server start和ambari-server stop即可启动和关闭ambari-server。 
2、启动成功后,在浏览器输入http://192.168.1.70:8080 
界面如下图所示: 

登录名和密码都是admin,这样就可以登录到管理控制台。

原创粉丝点击