Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应、管理和监控。

Ambari眼下已支持大多数Hadoop组件,包含HDFS、MapReduce、Hive、Pig、
Hbase、Zookeper、Sqoop和Hcatalog等。

Apache Ambari 支持HDFS、MapReduce、Hive、Pig、Hbase、Zookeper、Sqoop和Hcatalog等的集中管理。也是5个顶级hadoop管理工具之中的一个。



Ambari主要取得了下面成绩:



通过一步一步的安装向导简化了集群供应。

预先配置好关键的运维指标(metrics),能够直接查看Hadoop Core(HDFS和MapReduce)及相关项目(如HBase、Hive和HCatalog)是否健康。

支持作业与任务运行的可视化与分析,可以更好地查看依赖和性能。

通过一个完整的RESTful API把监控信息暴露出来。集成了现有的运维工具。

用户界面很直观,用户能够轻松有效地查看信息并控制集群。

Ambari使用Ganglia收集度量指标,用Nagios支持系统报警。当须要引起管理员的关注时(比方。节点停机或磁盘剩余空间不足等问题),系统将向其发送邮件。

此外,Ambari可以安装安全的(基于Kerberos)Hadoop集群,以此实现了对Hadoop 安全的支持,提供了基于角色的用户认证、授权和审计功能。并为用户管理集成了LDAP和Active Directory。

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

1.安装centos 6.5操作系统 

每个操作系统都配置了三块网卡,一块net,一块host only,一块桥接。除了net转发动态获取IP,其它的网卡IP都是静态配置的。

系统版本号:
CentOS release 6.5 (Final)
CPU:
model name      : Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz
stepping        : 3
cpu MHz         : 3192.620
cache size      : 6144 KB
clflush size    : 64
cache_alignment : 64
address sizes   : 42 bits physical, 48 bits virtual
内存
MemTotal:        1004412 kB 1G
硬盘
总容量 20G

节点名称
IP1
IP2
备注
hadoop1
192.168.253.188
动态联网
root/123456/192.168.1.122  桥接
hadoop2
192.168.253.189
动态联网

hadoop3
192.168.253.190
动态联网


2.ssh免秘钥登录

创建用户hadoop

[root@hadoop3 ~]# useradd hadoop
[root@hadoop3 ~]# passwd hadoop 
改动password
全部机器都使用相同的password最好。



使用hadoop用户,命令例如以下

ssh-keygen -t rsa  生成rsa加密的密钥



cp id_rsa.pub authorized_keys             copy文件


cat id_rsa.pub>>authorized_keys 将其它的秘钥追加到这一个文件里,然后分发给全部机器

[hadoop@hadoop1 .ssh]$ cat id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqxuCo78OdD/GIgphhLdKFA+vop4AnyiBaNDYlUE6PPwzqoBZVmmGPjrBV+rM/GQkZ1xrDCabKywvcgz+YW5vmo511bZ9ZBXQXck/zSkHcf84YXZo56dcFd00qpbFA1y/5KhtRn4J1REhHRJFYx99ZlBr9miNnGQfZeEYJsNANzTwJGU9Vc5r5Qvkhi9bJ70THkP0rMm2fuSYKTo3QxlixGzVCrZsG6D3Rv4KdXgKtkxAAvTi/7jVEu0WovjbpFlz2VoQT86zhQUmU6S8QWkMlk8kMvEzr+QUrS08ks+8BaSi7Kw+4NmfDNNd/EmI9j8NTWQEWajebOcJYl2n7HaXNw== hadoop@hadoop2.com
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5O2ru0IFgXmEdRvr/7cV9cJjZ2/MrYI7ip3UttVu1y6NskQBtqWPE08pxeX3VHoxtqFoqoJCdSlpr9KByngD4Z9U6d5j2UtLbZ9ZCs59YjSO+pinZaXpeKlXH4revdfoRJtmpG4FfyBDi11maDzoJEKObyz3Pi4QxvmI12NQtttFcCRPfv7MqT9l0tuwY5aRbCZVeybWwyZjhtI15p2NAB/042OsQ/FXLvtqVRl4+IOol0yjgi8KTKaBlvWDeKVrLzl4h0tuFUcfNv0yUW+KzrTD7Zj8Q7SpFg73uLn0Ufeq5UtCo0+poMpl+yVcZt0SD1Yic8Er5/i61Pg1ehCFKQ== hadoop@hadoop1.com
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA8wZr0bFUb0KeD8RfnX0KmujcpRw2r5hb/Opfp1ZXGU36BMmZDRwWHB8E1WaezRUubGVa/HTFm6zV7jetEJAsx9jUIPjEfRd25vW/Xej6gaYlUSg7yTf3H3KTb3wNmqiDziSD8yg9G0bPGcNXVfYAz7CEBPAxk9QFSJNtXxFeqSb9yKdBOzsA4hx1oLwV7G/xOUlCzuwSaS5YMG5eKrn1TDCK+FxcBxk6QpNAWO665XeKN/JTZi1bIQEAqC1tJJo1VFgW9/+gE2skI9RpJapVDm+TiZU/wOVqQek/hFLEfhL5f56wsJlz9lOBhxBPBGAbOBlzCJJCiOhmyx7sW73+Tw== hadoop@hadoop3.com
scp :复制给其它的主机

 scp authorized_keys hadoop@192.168.253.188:.ssh/

3.接下来配置全部的hosts文件

[root@hadoop1 .ssh]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.253.188 hadoop1.com
192.168.253.189 hadoop2.com
192.168.253.190 hadoop3.com
~
wq保存。

分发:
[root@hadoop1 .ssh]# scp /etc/hosts root@hadoop2.com:/etc/hosts
[root@hadoop1 .ssh]# scp /etc/hosts root@hadoop3.com:/etc/hosts

4.配置完毕检查能否够免秘钥登录

[hadoop@hadoop2 ~]$ ssh hadoop3.com
The authenticity of host 'hadoop3.com (192.168.253.190)' can't be established.
RSA key fingerprint is 16:c3:fc:d7:fc:db:98:ba:ef:aa:54:e4:d9:f5:51:be.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hadoop3.com' (RSA) to the list of known hosts.
server之间能够互相ssh登录,成功

5.安装ambari

[root@hadoop1 ~]# yum install wget
安装wget工具

首先须要获取 Ambari 的公共库文件(public repository)。登录到 Linux 主机并运行以下的命令(也能够自己手工下载):
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
将下载的 ambari.repo 文件复制到 Linux 的系统文件夹/etc/yum.repos.d/。拷贝完后,我们须要获取该公共库的全部的源文件列表。依次运行下面命令。
yum clean all
yum list|grep ambari

Cleaning up list of fastest mirrors
[root@hadoop1 yum.repos.d]# yum list|grep ambari
ambari-agent.x86_64                       2.0.1-45                       Updates-ambari-2.0.1
ambari-log4j.noarch                       2.0.1.45-1                     Updates-ambari-2.0.1
ambari-metrics-collector.x86_64           2.0.1-45                       Updates-ambari-2.0.1
ambari-metrics-common.noarch              2.0.1-45                       Updates-ambari-2.0.1
ambari-metrics-hadoop-sink.x86_64         2.0.1-45                       Updates-ambari-2.0.1
ambari-metrics-monitor.x86_64             2.0.1-45                       Updates-ambari-2.0.1
ambari-server.noarch                      2.0.1-45                       Updates-ambari-2.0.1
hdp_mon_ganglia_addons.noarch             2.0.1.45-1.el6                 Updates-ambari-2.0.1
hdp_mon_nagios_addons.noarch              2.0.1.45-1.el6                 Updates-ambari-2.0.1

6.ambari配置

待安装完毕后,便须要对 Ambari Server 做一个简单的配置。运行以下的命令。

amari-server setup
[root@hadoop1 ~]# ambari-server setup
Using python  /usr/bin/python2.6
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'enforcing'
Temporarily disabling SELinux
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? 
Adjusting ambari-server permissions and ownership...
Checking iptables...
WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.
OK to continue [y/n] (y)?

Checking JDK...
[1] Oracle JDK 1.7
[2] Oracle JDK 1.6
[3] - Custom JDK
==============================================================================
Enter choice (1): 1
To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz

7.ambari启动

简单的 setup 配置完毕后。就能够启动 Ambari 了。执行以下的命令。

ambari-server start
[root@hadoop1 ~]# ambari-server start
Using python  /usr/bin/python2.6
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
Ambari Server 'start' completed successfully.
通过命令tail -f /var/log/ambari-server/ambari-server.log 查看服务器日志
[root@hadoop1 ~]# tail -f /var/log/ambari-server/ambari-server.log 
29 Dec 2015 13:25:44,472  INFO [main] Configuration:514 - Generation of file with password
29 Dec 2015 13:25:46,115  INFO [main] Configuration:527 - Reading password from existing file
29 Dec 2015 13:25:47,753  INFO [main] Configuration:527 - Reading password from existing file
29 Dec 2015 13:25:48,195  INFO [main] ViewExtractor:82 - Creating archive folder /var/lib/ambari-server/resources/views/work/ADMIN_VIEW{2.0.0}.
29 Dec 2015 13:25:48,196  INFO [main] ViewExtractor:89 - Extracting files from ambari-admin-2.0.1.45.jar.
29 Dec 2015 13:25:49,386  INFO [main] Configuration:527 - Reading password from existing file
29 Dec 2015 16:32:07,171  INFO [main] Configuration:527 - Reading password from existing file
29 Dec 2015 16:32:07,213  INFO [main] Configuration:747 - Hosts Mapping File null
29 Dec 2015 16:32:07,213  INFO [main] HostsMap:60 - Using hostsmap file null
29 Dec 2015 16:32:08,470  INFO [main] ControllerModule:173 - Detected POSTGRES as the database type from the JDBC URL
29 Dec 2015 16:32:18,870  INFO [main] AmbariServer:655 - Getting the controller
29 Dec 2015 16:32:22,555  INFO [main] StackDirectory:408 - Stack '/var/lib/ambari-server/resources/stacks/HDP/2.0.6.GlusterFS' doesn't contain an upgrade directory
29 Dec 2015 16:32:22,613  INFO [main] StackDirectory:429 - Role command order info was loaded from file: /var/lib/ambari-server/resources/stacks/HDP/2.0.6.GlusterFS/role_command_order.json
29 Dec 2015 16:32:22,703  INFO [main] StackDirectory:408 - Stack '/var/lib/ambari-server/resources/stacks/HDP/2.1.GlusterFS' doesn't contain an upgrade directory

8.完毕

打开地址


Charles 2015-12-29于Phnom Phen




版权说明:
本文由Charles Dong原创。本人支持开源以及免费故意的传播,反对商业化谋利。
CSDN博客:http://blog.csdn.net/mrcharles
个人站:http://blog.xingbod.cn
EMAIL:charles@xingbod.cn


hadoop集群ambari搭建(1)之ambari-server安装的更多相关文章

  1. hadoop集群环境搭建之zookeeper集群的安装部署

    关于hadoop集群搭建有一些准备工作要做,具体请参照hadoop集群环境搭建准备工作 (我成功的按照这个步骤部署成功了,经实际验证,该方法可行) 一.安装zookeeper 1 将zookeeper ...

  2. hadoop集群环境搭建之安装配置hadoop集群

    在安装hadoop集群之前,需要先进行zookeeper的安装,请参照hadoop集群环境搭建之zookeeper集群的安装部署 1 将hadoop安装包解压到 /itcast/  (如果没有这个目录 ...

  3. hadoop集群环境搭建准备工作

    一定要注意hadoop和linux系统的位数一定要相同,就是说如果hadoop是32位的,linux系统也一定要安装32位的. 准备工作: 1 首先在VMware中建立6台虚拟机(配置默认即可).这是 ...

  4. hadoop集群的搭建与配置(2)

    对解压过后的文件进行从命名 把"/usr/hadoop"读权限分配给hadoop用户(非常重要) 配置完之后我们要创建一个tmp文件供以后的使用 然后对我们的hadoop进行配置文 ...

  5. hadoop集群的搭建

    hadoop集群的搭建 1.ubuntu 14.04更换成阿里云源 刚刚开始我选择了nat模式,所有可以连通网络,但是不能ping通,我就是想安装一下mysql,因为安装手动安装mysql太麻烦了,然 ...

  6. 关于hadoop集群管理系统搭建的规划说明

    Hadoop集群管理系统搭建是每个入门级新手都非常头疼的事情,因为你可能花费了很久的时间在搭建运行环境,最终却不知道什么原因无法创建成功.但对新手来说,运行环境搭建不成功的概率还蛮高的. 在之前的分享 ...

  7. Hadoop集群环境搭建步骤说明

    Hadoop集群环境搭建是很多学习hadoop学习者或者是使用者都必然要面对的一个问题,网上关于hadoop集群环境搭建的博文教程也蛮多的.对于玩hadoop的高手来说肯定没有什么问题,甚至可以说事“ ...

  8. hadoop集群的搭建(分布式安装)

    集群 计算机集群是一种计算机系统,他通过一组松散集成的计算机软件和硬件连接起来高度紧密地协同完成计算工作. 集群系统中的单个计算机通常称为节点,通常通过局域网连接. 集群技术的特点: 1.通过多台计算 ...

  9. Hadoop集群上搭建Ranger

    There are two types of people in the world. I hate both of them. Hadoop集群上搭建Ranger 在搭建Ranger工程之前,需要完 ...

  10. Hadoop集群初步搭建:

    自己整理了一下Hadoop集群简易搭建的过程,感谢尚观科技贾老师的授课和指导! 基本环境要求:能联网电脑一台:装有Centos系统的VMware虚拟机:Xmanager Enterprise 5软件. ...

随机推荐

  1. Centos下Elasticsearch安装详细教程

    Centos下Elasticsearch安装详细教程 1.Elasticsearch简介 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于 ...

  2. 洛谷——P1101 单词方阵

    https://www.luogu.org/problem/show?pid=1101#sub 题目描述 给一nXn的字母方阵,内可能蕴含多个“yizhong”单词.单词在方阵中是沿着同一方向连续摆放 ...

  3. hibernate 注解配置<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/X

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  4. 洛谷 P1599 结算日

    洛谷 P1599 结算日 题目描述 “不放债不借债”,贝西多么希望自己可以遵循这个忠告.她已经和她的N(1 <= N <= 100,000)个朋友有了债务关系,或者借债了,或者放债了.她的 ...

  5. 【CS Round #44 (Div. 2 only) D】Count Squares

    [链接]点击打开链接 [题意] 给你一个0..n和0..m的区域. 你可以选定其中的4个点,然后组成一个正方形. 问你可以圈出多少个正方形. (正方形的边不一定和坐标轴平行) [题解] 首先,考虑只和 ...

  6. jquery验证篇

    jquery验证:验证不了(包括easy ui 插件引用的js) jquery easy ui 引用的js <span style="color:#000000;">& ...

  7. 【CodeForces】Gargari and Bishops

    依据贪心能够知道,放置的教主必须不能相互攻击到(也就是不在一条对角线上)才干够使得结果最大化. 依据观察能够得到教主相互不攻击的条件是他的坐标和互为奇偶(x + y) 之后直接暴力,处理每一个坐标对角 ...

  8. sql语句的编程手册 SQL PLUS

    一.SQL PLUS 引言 SQL命令 以下17个是作为语句开头的关键字: alter drop revoke audit grant rollback* commit* insert select ...

  9. git的安装及其使用

    在Windows上安装Git的快捷方式: 工具:1.Windows的console工具:ConEmu(https://conemu.github.io/)多窗口.记录log.多theme选择,操作Gi ...

  10. Microsoft iSCSI Software Target 快照管理

    Microsoft iSCSI Software Target 支持快照管理,可以对设备进行手工创建快照.快照任务计划.快照回滚等操作. 首先配置iscsi 目标及设备映射关系,并在客户端通过发起程序 ...