一、概述

Apache Ambari是一个基于Web的支持Apache Hadoop集群的供应、管理和监控的开源工具,Ambari已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeeper、Sqoop和Hcatalog等。提供Web UI进行可视化的集群管理,简化了大数据平台的安装、使用难度。

二、安装部署

2.1 主机规划

| 序号 | IP地址 | 主机名 |系统版本|
| -------- | -------- | -------- |
| 1 | 172.20.2.222 | ambari-server |centos7.3
| 2 | 172.20.2.203 | hadoop-1 |centos7.3
| 3 | 172.20.2.204 | hadoop-2 |centos7.3
| 4 | 172.20.2.205 | hadoop-3 |centos7.3

2.2 部署

2.2.1 基础环境部署

a.修改主机名配置hosts

  1. systemctl stop firewalld
  2. hostnamectl set-hostname ambari-server #更改个主机名
  3. sed -i 's/SELINUX=enforcing/SELINUX=disable/g' /etc/selinux/config
  4. setenforce 0
  5. cat >>/etc/hosts<<EOF #添加各个节点hosts解析
  6. 172.20.2.222 ambari-server
  7. 172.20.2.203 hadoop-1
  8. 172.20.2.204 hadoop-2
  9. 172.20.2.205 hadoop-3
  10. EOF

b.配置ambari-server免密钥登录其他节点

  1. ssh-keygen -t rsa #在ambari-server生成密钥对
  2. for num in `seq 1 3`;do ssh-copy-id -i /root/.ssh/id_rsa.pub root@hadoop-$num;done

c.在ambari-server安装数据库
在ambari的setup中我们可以选择使用默认的postgresql,也可以自定义使用其他数据库,此处选用mariadb,便于后期管理维护

  1. yum -y install mariadb-server mysql-connector-java
  2. systemctl start mariadb
  3. mysql -uroot password "mysqladmin"
  4. 登录数据库后我们采用root登录

d.配置本地yum源
由于ambari的各个组件包很大,HDP大约快6G,我们采取离线安装方式,将ambari-server配置为yum源,事先在网上下载HDP、HDP-UTILS和Ambari
软件版本:

参考url:ambari各版本参考链接
HDP和HDP UTILS参考链接

ambari HDP HDP-UTILS
2.4.1.0 2.5.0.0 1.1.0.21
  1. yum install httpd -y && systemctl start httpd
  2. mkdir /software && cd /software
  3. #下载软件
  4. wget -c http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.1.0/ambari-2.4.1.0-centos7.tar.gz
  5. wget -c http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0/HDP-2.5.0.0-centos7-rpm.tar.gz
  6. wget -c http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7/HDP-UTILS-1.1.0.21-centos7.tar.gz
  7. #创建目录
  8. mkdir -p /var/www/html/ambari
  9. mkdir /var/www/html/hdp/{HDP,HDP-UTILS-1.1.0.21}
  10. #解压软件
  11. tar -zxvf ambari-2.4.1.0-centos7.tar.gz -C /var/www/html/ambari/
  12. tar -zxvf HDP-UTILS-1.1.0.21-centos7.tar.gz -C /var/www/html/hdp/HDP-UTILS-1.1.0.21/
  13. tar -zxvf HDP-2.5.0.0-centos7-rpm.tar.gz -C /var/www/html/hdp/
  14. 配置ambari YUM
  15. cat >/etc/yum.repos.d/ambari.repo<<EOF
  16. #VERSION_NUMBER=2.4.1.0-22
  17. [Updates-ambari-2.4.1.0]
  18. name=ambari-2.4.1.0 - Updates
  19. baseurl=http://172.20.2.222/ambari/AMBARI-2.4.1.0/centos7/2.4.1.0-22/
  20. gpgcheck=1
  21. gpgkey=http://172.20.2.222/ambari/AMBARI-2.4.1.0/centos7/2.4.1.0-22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
  22. enabled=1
  23. priority=1
  24. EOF
  25. #配置hdp YUM源
  26. cat >/etc/yum.repos.d/hdp.repo<<EOF
  27. #VERSION_NUMBER=2.5.0.0-1245
  28. [HDP-2.5.0.0]
  29. name=HDP Version - HDP-2.5.0.0
  30. baseurl=http://172.20.2.222/hdp/HDP/centos7/
  31. gpgcheck=1
  32. gpgkey=http://172.20.2.222/hdp/HDP/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
  33. enabled=1
  34. priority=1
  35. [HDP-UTILS-1.1.0.21]
  36. name=HDP-UTILS Version - HDP-UTILS-1.1.0.21
  37. baseurl=http://172.20.2.222/hdp/HDP-UTILS-1.1.0.21/
  38. gpgcheck=1
  39. gpgkey=http://172.20.2.222/hdp/HDP-UTILS-1.1.0.21/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
  40. enabled=1
  41. priority=1
  42. EOF

2.2.2 安装配置ambari

a.安装ambari server

  1. yum clean all
  2. yum makecache
  3. yum -y install ambari-server
  4. #进入数据库创建ambari库和导入数据
  5. mysql>create database ambari DEFAULT CHARSET utf8;
  6. mysql>use ambari
  7. mysql>source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

b.配置ambari

  1. [root@ambari-server hdp]# ambari-server setup
  2. Using python /usr/bin/python
  3. Setup ambari-server
  4. Checking SELinux...
  5. SELinux status is 'enabled'
  6. SELinux mode is 'permissive'
  7. WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
  8. OK to continue [y/n] (y)? y
  9. Customize user account for ambari-server daemon [y/n] (n)? y
  10. Enter user account for ambari-server daemon (root):root
  11. Adjusting ambari-server permissions and ownership...
  12. Checking firewall status...
  13. Checking JDK...
  14. Do you want to change Oracle JDK [y/n] (n)? y
  15. [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
  16. [2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
  17. [3] Custom JDK
  18. ==============================================================================
  19. Enter choice (1): 1
  20. To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.or
  21. acle.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
  22. Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u77
  23. -linux-x64.tar.gzjdk-8u77-linux-x64.tar.gz... 100% (173.0 MB of 173.0 MB)
  24. Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u77-linux-x64.tar.gz
  25. Installing JDK to /usr/jdk64/
  26. Successfully installed JDK to /usr/jdk64/
  27. Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jc
  28. e_policy-8.zip
  29. Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip
  30. Installing JCE policy...
  31. Completing setup...
  32. Configuring database...
  33. Enter advanced database configuration [y/n] (n)? y
  34. Configuring database...
  35. ==============================================================================
  36. Choose one of the following options:
  37. [1] - PostgreSQL (Embedded)
  38. [2] - Oracle
  39. [3] - MySQL / MariaDB
  40. [4] - PostgreSQL
  41. [5] - Microsoft SQL Server (Tech Preview)
  42. [6] - SQL Anywhere
  43. [7] - BDB
  44. ==============================================================================
  45. Enter choice (3): 3
  46. Hostname (ambari-server): ambari-server
  47. Port (3306):
  48. Database name (ambari):
  49. Username (root): root
  50. Enter Database Password (mysqladmin):
  51. Configuring ambari database...
  52. Copying JDBC drivers to server resources...
  53. Configuring remote database connection properties...
  54. WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/r
  55. esources/Ambari-DDL-MySQL-CREATE.sqlProceed with configuring remote database connection properties [y/n] (y)? y
  56. Extracting system views...
  57. ............
  58. Adjusting ambari-server permissions and ownership...
  59. Ambari Server 'setup' completed successfully.
  60. #启动服务
  61. ambari-server start

c.浏览器文本界面安装
浏览器访问:http://172.20.2.222:8080 默认用户名密码admin/admin

 
image

启动安装向导

 
image

添加将要创建的集群名称

 
image

下载hdp版本

 
image

选择本地hdp源

 
image

添加写需要安装的各个目标节点的主机名,填写ambari-server免密钥登录其他节点的私钥,确认注册

 
image
 
image

选择需要安装的服务

 
image

选择安装软件所在的那个节点上

 
image
 
image

自定义服务路径或密码

 
image

Review

 
image

进行安装部署

 
image
 
image

添加服务

 
image

查看各组件的概况和配置

 
image
 
image


小礼物走一走,来简书关注我

作者:kaliarch
链接:https://www.jianshu.com/p/3fa3df26816b
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

HDP 大数据平台搭建的更多相关文章

  1. 大数据平台搭建(hadoop+spark)

    大数据平台搭建(hadoop+spark) 一.基本信息 1. 服务器基本信息 主机名 ip地址 安装服务 spark-master 172.16.200.81 jdk.hadoop.spark.sc ...

  2. product of大数据平台搭建------CM 和CDH安装

    一.安装说明 CM是由cloudera公司提供的大数据组件自动部署和监控管理工具,相应的和CDH是cloudera公司在开源的hadoop社区版的基础上做了商业化的封装的大数据平台. 采用离线安装模式 ...

  3. CDH 大数据平台搭建

    一.概述 Cloudera版本(Cloudera’s Distribution Including Apache Hadoop,简称“CDH”),基于Web的用户界面,支持大多数Hadoop组件,包括 ...

  4. 大数据平台搭建-zookeeper集群的搭建

    本系列文章主要阐述大数据计算平台相关框架的搭建,包括如下内容: 基础环境安装 zookeeper集群的搭建 kafka集群的搭建 hadoop/hbase集群的搭建 spark集群的搭建 flink集 ...

  5. 大数据平台搭建-kafka集群的搭建

    本系列文章主要阐述大数据计算平台相关框架的搭建,包括如下内容: 基础环境安装 zookeeper集群的搭建 kafka集群的搭建 hadoop/hbase集群的搭建 spark集群的搭建 flink集 ...

  6. 大数据平台搭建:Hadoop

    To construct big data distributed platform based on Hadoop is a common method. Hadoop comes fron Goo ...

  7. 大数据平台搭建 - cdh5.11.1 - hadoop集群安装

    一.前言 由于线下测试的需要,需要在公司线下(测试)环境搭建大数据集群. 那么CDH是什么? hadoop是一个开源项目,所以很多公司再这个基础上进行商业化,不收费的hadoop版本主要有三个,分别是 ...

  8. Hadoop大数据平台搭建之前期配置(2)

    环境:CentOS 7.4 (1708  DVD) 工具:VMware.MobaXterm 一. 克隆大数据集群 1. 选中已经进行了基本配置的虚拟机,进行克隆. 2. 此处改为"创建完整克 ...

  9. 大数据平台搭建 - Mysql在linux上的安装

    一.简介 MySQL是一个关系型数据库系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品.MySQL 是最流行的关系型数据库管理系统之一,在 WEB 应用方面,MySQL是最好的 ...

随机推荐

  1. django.db.utils.ProgrammingError: 1146 解决办法

    出现原因: 因为直接在mysql中删除了表或者在执行过一次迁移后,在modles中修改了表名及对应的方法和引用 产生后果: 1.迁移的过程中可能出现表不存在的报错情况 2.迁移过程没有报错,在admi ...

  2. 【C#】上机实验五

    .设计一个控制台应用程序,定义一个MyPoint类,该类能表示二维平面空间的点,完成点类及运算符重载等相关功能.具体要求如下: ()MyPoint类中定义2个私有字段x和y及相应的构造函数. ()My ...

  3. 阿里云ECS云服务器Linux Tomcat启动慢 访问网页转圈

    状况: 今天购买了一台阿里云云服务器,按照正常的方式安装JDK,mysql,以及Tomcat 这里的版本信息有 系统 :Centos 7 tomcat: apache-tomcat-8.5.45.ta ...

  4. WebApi PUT与DELETE类型访问报错

    * 方法一 在项目的Web.Config文件加入 <modules> <remove name="WebDAVModule" /> </modules ...

  5. (三) Docker 常用操作与CentOS7 防火墙命令

    参考并感谢 Docker 常用命令 https://docs.docker.com/engine/reference/commandline/docker/ Docker 登录docker账户 doc ...

  6. Java字节流文件复制

    1.字节流 在 Java 中,文件的复制使用字节输入流和字节输出流实现,java.io 包有 InputStream 和 OutputStream 这两个顶层抽象类规范了读写文件所需的核心 API. ...

  7. RabbitMQ实战

    RabbitMQ消息队列 一.Hello World 1.amqp-client客户端依赖 2.Rabbitmq类与方法 二.交换机类型 Exchange Type 1.消息轮询分发(Round Ro ...

  8. 【开发笔记】- Java读取properties文件的五种方式

    原文地址:https://www.cnblogs.com/hafiz/p/5876243.html 一.背景 最近,在项目开发的过程中,遇到需要在properties文件中定义一些自定义的变量,以供j ...

  9. Delphi - 程序运行时不显示主窗体

    // 不显示主窗体 Application.ShowMainForm := False;

  10. 【English】 Re-pick up English for learning big data (not updated regularly)

    2019.10.6 parse:解析mean:平均数stddev:标准偏差 2019.10.7 bigdata platform:大数据平台 2019.10.14 allocate resource ...