ambari实战 (1)ambari介绍 http://zilongzilong.iteye.com/blog/2272263
ambari实战 (2)ambari安装 http://zilongzilong.iteye.com/blog/2272223
1.Ambari 的安装准备
1.1 用VMWARE搭建三台linux虚拟机,三台机器配置免秘钥登录
1.1.1 三台虚拟机配置如下:
hostname | ip | OS |
hadoop1 | 192.168.202.132 | Linux version 2.6.32-358.el6.x86_64,CentOS release 6.4 (Final) |
hadoop2 | 192.168.202.136 | Linux version 2.6.32-358.el6.x86_64,CentOS release 6.4 (Final) |
hadoop3 | 192.168.202.173 | Linux version 2.6.32-358.el6.x86_64,CentOS release 6.4 (Final) |
1.1.2配置hostname,设置主机名
vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=hadoop1
1.1.3配置host,设置ip和主机名的映射
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.202.132 hadoop1 192.168.202.136 hadoop2 192.168.202.173 hadoop3
1.1.4配置SSH免密码登录
[root@hadoop1 yum.repos.d]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 62:a2:d3:40:36:c2:1d:a3:c6:d2:75:5c:4f:98:bc:2b root@hadoop1 The key's randomart image is: +--[ RSA 2048]----+ | o...o.o. | |o.o.o.. +o | |o==. .. | |o+ . . | | . . o S. | | + oE.. | | o . . | | . | | | +-----------------+ [root@hadoop1 yum.repos.d]# cd /root/.ssh/ [root@hadoop1 .ssh]# ls id_rsa id_rsa.pub [root@hadoop1 .ssh]# cat id_rsa.pub>>authorized_keys [root@hadoop1 .ssh]# ls authorized_keys id_rsa id_rsa.pub [root@hadoop1 .ssh]# ssh root@hadoop2 cat /root/.ssh/id_rsa.pub>> authorized_ke ys root@hadoop2's password: [root@hadoop1 .ssh]# ssh root@hadoop3 cat /root/.ssh/id_rsa.pub>> authorized_ke ys The authenticity of host 'hadoop3 (192.168.202.173)' can't be established. RSA key fingerprint is 99:bf:9c:d2:93:3d:9d:94:1e:be:76:46:8f:83:d7:7f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'hadoop3,192.168.202.173' (RSA) to the list of known hosts. root@hadoop3's password: [root@hadoop1 .ssh]# scp -r /root/.ssh/authorized_keys root@hadoop2:/root/.ssh/ root@hadoop2's password: authorized_keys 100% 1182 1.2KB/s 00:00 [root@hadoop1 .ssh]# scp -r /root/.ssh/authorized_keys root@hadoop3:/root/.ssh/ root@hadoop3's password: authorized_keys 100% 1182 1.2KB/s 00:00 [root@hadoop1 .ssh]# chmod 600 /root/.ssh/authorized_keys
1.2确保 Yum 可以使用
通过公共库(public repository),安装 Hadoop 这些软件,背后其实就是应用 Yum 在安装公共库里面的 rpm 包。所以这里需要您的机器都能访问 Internet。
1.3Python安装,版本最好大于或等于2.6
#查看Python版本 [root@hadoop3 ~]# python -V Python 2.6.6
1.4安装ambari时候尽量用root安装
Ambari 的 Server 会 SSH 到 Agent 的机器,拷贝并执行一些命令。因此我们需要配置 Ambari Server 到 Agent 的 SSH 无密码登录。 Ambari 会创建一些 OS 用户。
2.Ambari安装
2.1下载Ambari 的公共库文件(public repository)
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
2.2将下载的 ambari.repo 文件拷贝到 Linux 的系统目录/etc/yum.repos.d/
mv ambari.repo /etc/yum.repos.d/ambari.repo
2.3获取该公共库的所有的源文件列表
[root@hadoop1 hadoop]# cd /etc/yum.repos.d/ [root@hadoop1 yum.repos.d]# yum clean all [root@hadoop1 ~]# yum list|grep ambari ambari-server.noarch 2.0.1-45 @Updates-ambari-2.0.1 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 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
2.4安装 Ambari Server
[root@hadoop1 ambari-server]# yum install ambari-server Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.163.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ambari-server.noarch 0:2.0.1-45 will be installed --> Finished Dependency Resolution Dependencies Resolved =========================================== Package Arch Version Repository Size =========================================== Installing: ambari-server noarch 2.0.1-45 Updates-ambari-2.0.1 86 M Transaction Summary =========================================== Install 1 Package(s) Total download size: 86 M Installed size: 104 M Is this ok [y/N]: y Downloading Packages: ambari-server-2.0.1-45.noarch.rpm | 86 MB 18:34 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : ambari-server-2.0.1-45.noarch 1/1 Verifying : ambari-server-2.0.1-45.noarch 1/1 Installed: ambari-server.noarch 0:2.0.1-45 Complete! [root@hadoop1 ambari-server]#
2.5配置 Ambari Server
[root@hadoop1 ambari-server]# ambari-server setup Using python /usr/bin/python2.6 Setup ambari-server Checking SELinux... SELinux status is 'disabled' Customize user account for ambari-server daemon [y/n] (n)? y Enter user account for ambari-server daemon (root):root Adjusting ambari-server permissions and ownership... Checking iptables... 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)? 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 jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB) Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz Installing JDK to /usr/jdk64/ Successfully installed JDK to /usr/jdk64/ Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip UnlimitedJCEPolicyJDK7.zip... 100% Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip Installing JCE policy... Completing setup... Configuring database... Enter advanced database configuration [y/n] (n)? y Configuring database... ========================= Choose one of the following options: [1] - PostgreSQL (Embedded) [2] - Oracle [3] - MySQL [4] - PostgreSQL ========================= Enter choice (1): Database name (ambari): Postgres schema (ambari): Username (ambari): Enter Database Password (bigdata): Re-enter password: Default properties detected. Using built-in database. Configuring ambari database... Checking PostgreSQL... Running initdb: This may take upto a minute. Initializing database: [ OK ] About to start PostgreSQL Configuring local database... Connecting to local database...done. Configuring PostgreSQL... Restarting PostgreSQL Extracting system views... .ambari-admin-2.0.1.45.jar .. Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully. [root@hadoop1 ambari-server]#
2.6启动 Ambari
[root@hadoop1 ambari-server]# 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. [root@hadoop1 ambari-server]#
2.7登录 Ambari server管理页面
登录URL:http://192.168.202.132:8080/, 登录账号密码:admin/admin
Ambari Server 就安装完成了。
相关推荐
如果您在使用过程中遇到任何问题,可扫描下方二维码关注公众号【大数据实战演练】或者加我好友【create17_】,回复【加群】,群内有不少已经搭建成功的小伙伴。 概述 目前上传至ambari-Kylin上的有两个版本,一个是...
Apache Ambari是一种基于Web的运维工具,支持Apache Hadoop集群的自动化部署、管理和监控。Ambari目前已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeeper、Sqoop和...2、安装与部署Ambari 3
Ambari是由 HortonWorks 开发的一个Hadoop相关的项目,这款软件具有集群自动化安装、中心化管理、集群监控、报警等功能,使得安装集群从几天的时间缩短在几小时以内,运维人员从数十人降低到几人以内,极大的提高...
【实战Hadoop 2.0】是一套深入学习Hadoop生态系统的PPT文档,涵盖了Hadoop分布式文件系统(HDFS)、资源调度器YARN、数据分析工具Spark、Ambari管理平台等多个关键组件。以下是这些核心知识点的详细解析: 1. **...
8. **安全与监控**:随着大数据应用的安全性日益重要,书中也会介绍如何在Hadoop环境中实现身份验证、授权和审计,以及如何使用Ambari等工具进行集群监控。 通过《Hadoop实战中文版》的学习,读者不仅可以掌握...
1. Ambari集群安装:介绍如何使用Ambari来管理和配置Hadoop集群,包括如何通过图形界面部署和维护集群。 Hive数据仓库工具 1. Hive的安装:讲解如何安装不同版本的Hive,从入门版本到用于生产环境的稳定版本。 2. ...
01:JavaSE基础 02:SpringMVC Mybatis 汽配城 03:Linux基础进阶(开发人员必备) 04:Hadoop Hive Hbase Flume Sqoop 05:ElasticSearch 06:Spark安装部署到高级 07:Scala基础到高级 ...10:Ambari+HDP搭建
本书详细讲解了Hadoop的安装、配置、运行以及维护等操作过程。首先,作者会对Hadoop的历史背景和发展前景进行介绍,帮助读者对Hadoop有一个宏观的认识。随后,书中将带领读者一步步搭建Hadoop集群环境,理解Hadoop...
5. Hadoop生态系统:除了上述核心组件,Hadoop生态系统还包括许多其他组件,如HBase、ZooKeeper、Ambari、Pig、Hive、Oozie等。这些组件提供了数据库管理、集群管理和工作流调度等功能。 Hadoop的典型应用场景包括...
此外,监控和故障排查也是企业级应用中不可忽视的部分,学习如何使用Ambari、Ganglia等工具对HBase集群进行性能监控和问题诊断,是提升系统稳定性的关键。 最后,本书可能还会讨论HBase的最新发展和未来趋势,比如...
对于企业级应用,本书还将涉及Spark的监控与故障排查,如何使用Spark的自带工具和第三方工具(如Ganglia、Ambari等)来监控Spark集群的健康状况,及时发现和解决问题。 总而言之,《大数据Spark企业级实战版》是一...
2. **YARN(Yet Another Resource Negotiator)**:资源管理和任务调度平台,负责将应用程序所需的资源分配给它们,并确保应用程序在集群中顺利运行。 3. **MapReduce**:这是一种编程模型,用于大规模数据集的并行...
另外,故障恢复和监控也是企业应用中必不可少的部分,书中可能会给出具体的策略和工具,如使用HBase的自带监控接口或者与其他监控系统(如Ambari)集成。 最后,书中可能会涉及一些企业级的最佳实践,比如数据模型...
常用的工具有Hadoop Metrics2、Ganglia、Ambari等,它们能帮助识别性能瓶颈、预测故障,确保平台的高可用性和稳定性。 6. **大数据平台项目综合案例**:实验15可能是一个具体的大数据项目实践,可能涵盖数据清洗、...
除了这些核心组件,软件包可能还包含其他工具和库,如Sqoop(用于导入导出数据到传统数据库),Flume(日志收集系统),Oozie(工作流调度系统),以及Ambari(Hadoop集群的管理和监控工具)。 安装文档通常会详细...
- **课程内容**:Ambari部分共有6课时,介绍Ambari的安装配置、集群管理、监控报警等功能。 - **学习目标**:通过本阶段的学习,学员应能够掌握如何使用Ambari高效地管理Hadoop集群。 #### 三、总结 通过以上课程...