• Ambari安装之安装并配置Ambari-server(三)


      不多说,直接上干货!

       前期博客

     Ambari安装之部署本地库(镜像服务器)(二)

    安装并配置Ambari-server

    (1)检查仓库是否可用

     

    [hadoop@ambari01 yum.repos.d]$ pwd
    /etc/yum.repos.d
    [hadoop@ambari01 yum.repos.d]$ yum repolist
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: centos.ustc.edu.cn
     * extras: centos.ustc.edu.cn
     * updates: mirrors.zju.edu.cn
    Updates-ambari-2.2.1.0                                                                                                                                                  | 2.9 kB     00:00     
    Updates-ambari-2.2.1.0/primary_db                                                                                                                                       |  89 kB     00:00     
    repo id                                                                                    repo name                                                                                     status
    Updates-ambari-2.2.1.0                                                                     ambari-2.2.1.0 - Updates                                                                        229
    base                                                                                       CentOS-6 - Base                                                                               6,696
    extras                                                                                     CentOS-6 - Extras                                                                                64
    updates                                                                                    CentOS-6 - Updates                                                                              974
    repolist: 7,963
    [hadoop@ambari01 yum.repos.d]$ 

    (2)安装Ambari-server

     

     

    [hadoop@ambari01 yum.repos.d]$ pwd
    /etc/yum.repos.d
    [hadoop@ambari01 yum.repos.d]$ sudo yum install ambari-server
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: mirrors.zju.edu.cn
     * extras: mirrors.zju.edu.cn
     * updates: mirrors.zju.edu.cn
    Updates-ambari-2.2.1.0                                                                                                                                                  | 2.9 kB     00:00     
    Updates-ambari-2.2.1.0/primary_db                                                                                                                                       |  89 kB     00:00     
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.x86_64 0:2.2.1.0-161 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-2.2.1.0-161.x86_64
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-6.el6 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-6.el6 for package: postgresql-server-8.4.20-6.el6.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-6.el6 for package: postgresql-server-8.4.20-6.el6.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-6.el6.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-6.el6 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-6.el6 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===============================================================================================================================================================================================
     Package                                         Arch                                 Version                                       Repository                                            Size
    ===============================================================================================================================================================================================
    Installing:
     ambari-server                                   x86_64                               2.2.1.0-161                                   Updates-ambari-2.2.1.0                               409 M
    Installing for dependencies:
     postgresql                                      x86_64                               8.4.20-6.el6                                  base                                                 2.6 M
     postgresql-libs                                 x86_64                               8.4.20-6.el6                                  base                                                 202 k
     postgresql-server                               x86_64                               8.4.20-6.el6                                  base                                                 3.4 M
    
    Transaction Summary
    ===============================================================================================================================================================================================
    Install       4 Package(s)
    
    Total download size: 415 M
    Installed size: 464 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/4): ambari-server-2.2.1.0-161.x86_64.rpm                                                                                                                             | 409 MB     00:22     
    (2/4): postgresql-8.4.20-6.el6.x86_64.rpm                                                                                                                               | 2.6 MB     00:02     
    (3/4): postgresql-libs-8.4.20-6.el6.x86_64.rpm                                                                                                                          | 202 kB     00:00     
    (4/4): postgresql-server-8.4.20-6.el6.x86_64.rpm                                                                                                                        | 3.4 MB     00:03     
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                                           14 MB/s | 415 MB     00:29     
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-6.el6.x86_64                                                                                                                                         1/4 
      Installing : postgresql-8.4.20-6.el6.x86_64                                                                                                                                              2/4 
      Installing : postgresql-server-8.4.20-6.el6.x86_64                                                                                                                                       3/4 
      Installing : ambari-server-2.2.1.0-161.x86_64                                                                                                                                            4/4 
      Verifying  : postgresql-server-8.4.20-6.el6.x86_64                                                                                                                                       1/4 
      Verifying  : postgresql-8.4.20-6.el6.x86_64                                                                                                                                              2/4 
      Verifying  : postgresql-libs-8.4.20-6.el6.x86_64                                                                                                                                         3/4 
      Verifying  : ambari-server-2.2.1.0-161.x86_64                                                                                                                                            4/4 
    
    Installed:
      ambari-server.x86_64 0:2.2.1.0-161                                                                                                                                                           
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-6.el6                           postgresql-libs.x86_64 0:8.4.20-6.el6                           postgresql-server.x86_64 0:8.4.20-6.el6                          
    
    Complete!
    [hadoop@ambari01 yum.repos.d]$ 

    (3)配置Ambari-server

     

     

    [hadoop@ambari01 yum.repos.d]$ pwd
    /etc/yum.repos.d
    [hadoop@ambari01 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2
    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):hadoop
    Adjusting ambari-server permissions and ownership...
    Checking firewall status...
    Checking JDK...
    [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
    [2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
    [3] Custom JDK
    ==============================================================================
    Enter choice (1): 3
    WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
    WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
    Path to JAVA_HOME: /usr/local/jdk/jdk1.8.0_60
    Validating JDK on Ambari Server...done.
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? n
    Configuring database...
    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.2.1.0.161.jar
    .....
    Adjusting ambari-server permissions and ownership...
    Ambari Server 'setup' completed successfully.
    [hadoop@ambari01 yum.repos.d]$ 

               注意:

            如果你是root用户,则这里就写root (推荐)
            好比我这里是hadoop用户,则这里就写hadoop(不建议)

    (4)查看并启动Ambari-server

    [hadoop@ambari01 yum.repos.d]$ sudo service ambari-server status
    Using python  /usr/bin/python2
    Ambari-server status
    Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid
    [hadoop@ambari01 yum.repos.d]$ sudo service ambari-server start
    Using python  /usr/bin/python2
    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.
    [hadoop@ambari01 yum.repos.d]$ 

    (5)在C:WindowsSystem32driversetc目录下配置hosts文件

     

    (6)输入地址登录ambari

     

     

    默认的用户名和密码都为admin

     

    登录之后的界面如下

     

     

    那么到此为止,我们集群部署前的所有准备工作就做好了,接下来我们就可以部署hadoop集群了。

     Ambari安装之部署hdp单节点集群

     

     

     

     

     

     

     

     

     

     

    欢迎大家,加入我的微信公众号:大数据躺过的坑        人工智能躺过的坑
     
     
     

    同时,大家可以关注我的个人博客

       http://www.cnblogs.com/zlslch/   和     http://www.cnblogs.com/lchzls/      http://www.cnblogs.com/sunnyDream/   

       详情请见:http://www.cnblogs.com/zlslch/p/7473861.html

      人生苦短,我愿分享。本公众号将秉持活到老学到老学习无休止的交流分享开源精神,汇聚于互联网和个人学习工作的精华干货知识,一切来于互联网,反馈回互联网。
      目前研究领域:大数据、机器学习、深度学习、人工智能、数据挖掘、数据分析。 语言涉及:Java、Scala、Python、Shell、Linux等 。同时还涉及平常所使用的手机、电脑和互联网上的使用技巧、问题和实用软件。 只要你一直关注和呆在群里,每天必须有收获

          对应本平台的讨论和答疑QQ群:大数据和人工智能躺过的坑(总群)(161156071) 

     

     

     

  • 相关阅读:
    大道至简伪代码形式读后感
    大道至简读后感
    使用类型转换生成六位验证字符,实现用户输入验证码的功能
    flex弹性布局的基本介绍
    清除浮动的方法以及为什么清除浮动
    :target伪类制作tab选项卡
    div中的内容水平垂直居中
    setTimeout和setInterval的区别以及如何写出效率高的倒计时
    margintop影响父元素定位
    关于页面中弹窗的定位问题
  • 原文地址:https://www.cnblogs.com/zlslch/p/6629247.html
Copyright © 2020-2023  润新知