Ubuntu 16.04 下的安装与配置ambari

前端之家收集整理的这篇文章主要介绍了Ubuntu 16.04 下的安装与配置ambari前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

以ubuntu 系统为例

安装步骤:

安装配置 JDK 1.81

  1. 下载安装包
    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 下载 jdk-8u144-linux-x64.tar.gz
  2. 解压,设置环境变量
    • tar -xvf jdk-8u144-linux-x64.tar.gz
    • sudo mkdir -p /usr/java
    • sudo cp -R -v jdk1.8.0_144/ /usr/java/
    • vi /etc/environment #粗体部分是新加的

      PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games :/usr/java/jdk1.8.0_144/bin
      JAVA_HOME=/usr/java/jdk1.8.0_144

  3. @H_502_40@
    • source /etc/environment
    • echo $JAVA_HOME #检查环境变量设置
    • java -version #检查java版本

    下面是三种安装方案

    1. ubuntu 12,ubuntu14本地安装 ambari
    2. ubuntu 16 本地源安装 ambari
    3. 在线安装(这种网速很慢,会耗时好几天)
    4. @H_502_40@

      * 根据自己的情况选择。推荐方案2*

      方案1. ubuntu 12,ubuntu14本地安装 ambari

      • sudo dpkg -i ambari-server_2.*_amd64.deb
      • sudo dpkg -i ambari-metrics-assembly_2.*_amd64.deb
      • sudo dpkg -i ambari-agent_2.*_amd64.deb

      安装依赖问题

      * 如果遇到安装错误,因为有安装依赖 *
      连网状态需要执行

      sudo apt-get install -f -y
      解决安装依赖,然后继续安装

      非联网状态需要先安装如下依赖软件

      dotheright@master:~/soft$ sudo apt-cache depends ambari-server
      [sudo] password for dotheright:
      ambari-server
      Depends: openssl
      Depends: postgresql
      Depends: python
      Depends: curl
      curl:i386
      dotheright@master:~/soft$ sudo apt-cache depends ambari-agent
      ambari-agent
      Depends: openssl
      Depends: zlibc
      Depends: python
      dotheright@master:~/soft$ sudo apt-cache depends ambari-metrics-assembly
      ambari-metrics-assembly
      Depends: python
      Depends: python-dev
      Depends: gcc

      方案2. ubuntu 16 本地源安装 ambari

      1.下载按本地源需要的安装包
      百度云地址:https://pan.baidu.com/s/1hr4vfta 提取码 ys4m
      里面包含

      ambari-2.5.2.0-ubuntu16.tar.gz
      HDP-UTILS-1.1.0.21-ubuntu16.tar.gz
      HDP-2.6.2.0-ubuntu16-deb.tar.gz


      1. 安装apache2 开启http服务
      2. @H_502_40@
        • mkdir -p /var/www/html
        • apt-get install apache2
          浏览器到http://localhost,你应该看到apache2的测试页:


        • 然后将 ambari-2.5.2.0-ubuntu16.tar.gz ; HDP-UTILS-1.1.0.21-ubuntu16.tar.gz ; HDP-2.6.2.0-ubuntu16-deb.tar.gz 拷贝到 /var/www/html 目录下并解压缩

        • cd /etc/apt/sources.list.d
        • 添加 ambari.list 其内容如下:

          #VERSION_NUMBER=2.5.2.0-298
          deb http://localhost/ambari/ubuntu16 Ambari main

        • apt-get update

        • 执行下面安装命令
          1. apt-get install ambari-server -y
          2. apt-get install ambari-agent -y
          3. apt-get install ambari-metrics-assembly -y
          4. @H_502_40@

        方案3. 在线安装

        1. cd /etc/apt/sources.list.d
        2. wget http://public-repo-1.hortonworks.com/ambari/ubuntu16/2.x/updates/2.5.2.0/ambari.list
        3. apt-key adv –recv-keys –keyserver keyserver.ubuntu.com B9733A7A07513CAD
        4. apt-get update
        5. apt-get install ambari-server
        6. apt-get install ambari-agent
        7. apt-get install ambari-metrics-assembly
        8. @H_502_40@

        具体的 ambari.list 需要在 https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-installation/content/ambari_repositories.html中寻找

        配置和启动

        后续注意事项

        这里只是 安装了 ambari 自身的软件,如果需要开启各种服务组件,比如 需要在将 HDP源 加入sources.list.d 具体的hdp.list 需要到 去找
        https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-installation/content/hdp_26_repositories.html

        1. cd /etc/apt/sources.list.d
        2. wget http://public-repo-1.hortonworks.com/HDP/ubuntu16/2.x/updates/2.6.2.0/hdp.list
        3. @H_502_40@

猜你在找的Ubuntu相关文章