Ambari 2.6.1 构建 Hadoop 集群 ---- CentOS 7

Centos 7.2 安装 Ambari 2.2.2 + HDP 2.4.2 搭建Hadoop集群 阅读详情

 

1. 准备 ( Getting Ready )


Ambari 为 Hadoop 集群提供了一个端对端的管理和监控方案(end-to-end management and monitoring solution)。利用 Ambari 的 Web UI and REST APIs, 可以在一个中心点部署、操作、管理配置,以及监控集群的所有节点服务。



    1.1 确定安装栈兼容性 ( Determine Stack Compatibility )
    -------------------------------------------------------------------------------------------------------------------------------------
    HDP —— Hortonworks Data Platform

    Ambari 支持很多安装栈版本,如下表所示:

            
            Use this table to determine whether your Ambari and HDP stack versions are compatible
            
            +========+==========+===========+=======================+
            | Ambari | HDP 2.6    | HDP 2.5    | HDP 2.4(deprecated)    |
            +--------+----------+-----------+-----------------------+
            | 2.6.x  | √        | √            | √                        |
            +--------+----------+-----------+-----------------------+
            | 2.5.x  | √        | √            | √                        |
            +--------+----------+-----------+-----------------------+
            | 2.4.x  |            | √            | √                        |
            +--------+----------+-----------+-----------------------+

            Ambari does not install Hue or HDP Search (Solr).


    1.2 满足最小系统要求 ( Meet Minimum System Requirements )
    -------------------------------------------------------------------------------------------------------------------------------------
    系统必须满足如下最小系统要求

    
    ● 浏览器要求 (Browser Requirements)
    -------------------------------------------------------------------------------------------------------------------------------------
        
            Ambari 2.5.1 or later Browser Requirements        
        +-------------------+-----------------------------------+
        | Operating System    |            Browser                    |
        +-------------------+-----------------------------------+
        |                     | Chrome 56.0.2924.87, 57.0.2987    |
        |    Linux            +-----------------------------------+
        |                    | Firefox 51, 52                    |
        +-------------------+-----------------------------------+

    
    ● 软件要求 (Software Requirements)
    -------------------------------------------------------------------------------------------------------------------------------------
    每部主机上:
        yum and rpm (RHEL/CentOS/Oracle Linux)
        scp, curl, unzip, tar, and wget
        OpenSSL (v1.01, build 16 or later)
        Python 2.7.x



    ● JDK 要求 (JDK Requirements)
    -------------------------------------------------------------------------------------------------------------------------------------
    
            HDP 2.6.4 JDK Support
        +---------------+-----------------------------------------------+
        |     JDK            |         Version                                    |
        +---------------+-----------------------------------------------+
        | Open Source    | JDK 8                                            |
        +---------------+-----------------------------------------------+
        | Oracle        | JDK 8, 64-bit (minimum JDK 1.8.0_77), default    |
        +---------------+-----------------------------------------------+


    ● 数据库要求 (Database Require)
    -------------------------------------------------------------------------------------------------------------------------------------
    Ambari 要求一个关系数据库来存储有关集群配置和拓扑信息。如果安装 HDP Stack 选择 Hive 或 Oozie, 也需要一个关系型数据库。
    
    Ambari 支持的数据库:
        □ PostgreSQL 9.1.13+,9.3, 9.4***
        □ MariaDB 10.1*
        □ MySQL 5.6****
        □ Oracle 11gr2
        □ Oracle 12c**

    默认情况下,Ambari 在 Ambari Server 主机上安装一个 PostgreSQL 实例。Hortonworks  支持任何版本的 PostgreSQL, 安装 Ambari Server 时会自动
    安装。也可以选择使用一个已存在的  PostgreSQL, MySQL 或 Oracle  实例。

    如果使用 HDP 2.5, MariaDB 10 数据库支持 RHEL/CentOS/Oracle Linux 7 or SLES 12.
    使用已存在的 Oracle 12c 数据库只支持 HDP 2.3 or later.
    使用已存在的 PostgreSQL 9.4 只支持 HDP 2.5 or later.
    使用已存在的 MySQL 5.6 数据库只支持默认的, InnoDB 引擎.

    
    ● 内存要求 (Memory Requirements)
    -------------------------------------------------------------------------------------------------------------------------------------
    Ambari 主机至少 1 GB RAM, 500 MB 可用。
    
    
    ● 检查最大打开文件描述符数量 (Check the Maximum Open File Descriptors)
    -------------------------------------------------------------------------------------------------------------------------------------    
    建议最大打开文件数量为 10000,或者更多。检查当前可打开文件数量,在每部主机上执行下面命令:
    
        ulimit -Sn
        ulimit -Hn
    
    如果输出不大于 10000,运行下面命令来设置合适的默认值:
    
        ulimit -n 10000

    
    1.3 收集信息 ( Collect Information )
    -------------------------------------------------------------------------------------------------------------------------------------
    部署集群之前,应收集如下信息:
    
    ● 每个主机的 FQDN —— fully qualified domain name 。 可通过如下命令检查:
    
        hostname -f
        
    ● 每个主机要设置的组件列表
    
    ● 规划数据存储挂载点的基目录 (base directories)
    
        □ NameNode data
        □ DataNodes data
        □ Secondary NameNode data
        □ YARN data
        □ ZooKeeper data, if you install ZooKeeper
        □ Oozie data
        □ Various log, pid, and db files, depending on your install type
    
        重要提示:
        ---------------------------------------------------------------------------------------------------------------------------------
        必须使用 base directories 为组件和 Hadoop 数据提供持久化存储位置。使用可能被删除的位置来安装组件会导致集群失效或数据丢失。例如,
        不要在 base directory 路径上使用 /tmp 。
    
    
    
    1.4 准备环境 ( Prepare the Environment )
    -------------------------------------------------------------------------------------------------------------------------------------    
    使用 Ambari 部署 Hortonworks stack, 需要准备部署环境。
    
    
    
    ■ 设置无密码 SSH (Set Up Password-less SSH)
    -------------------------------------------------------------------------------------------------------------------------------------
    为了执行 Ambari Server 在集群的所有主机上自动安装 Ambari Agent, 必须在集群的 Ambari Server 主机和所有其他主机之间设置无密码 SSH 连接。
    Ambari Server 主机利用 SSH 公钥认证远程访问并安装 Ambari Agent.
    
        注:也可以选择在集群的每个主机上手动安装 Ambari Agent. 这种情况下,不需要生成和分发 SSH key
    
    步骤:
        ① Ambari Server 主机上生成 SSH keys        
            ssh-keygen
            
        ② 复制 SSH 公钥(id_rsa.pub) 到目标主机的根帐号 (root account)
            .ssh/id_rsa
            .ssh/id_rsa.pub
            
        ③ 在目标主机上把 SSH 公钥(SSH Public Key)添加到 authorized_keys 文件
            cat id_rsa.pub >> authorized_keys
            
            
        ④ 根据使用的 SSH 版本,在目标主机上可能需要设置 .ssh 目录的权限为 700, 目录下的 authorized_keys 文件权限为 600
            chmod 700 ~/.ssh
            chmod 600 ~/.ssh/authorized_keys
            
        ⑤ 从 Ambari Server 的主机上,确保可以 SSH 无密码连接到集群的每一部主机上。
            ssh root@<remote.target.host>
            
        ⑥ 如果第一次登录显示:Are you sure you want to continue connecting (yes/no)?
            输入 yes
        
        ⑦ 在运行基于 web 的 Ambari 安装向导的主机上保留一份 SSH 私钥 (SSH Private Key) 拷贝。
    
        
        便捷方法:将配置好的 .ssh 目录整个复制到所有目标主机
        
            生成密钥之后,执行:    
            [root@ambari ~]# ssh-copy-id localhost
            [root@ambari ~]# scp -r ~/.ssh namenode.sansovo.org:~/
    
        注:使用非根 SSH 帐号(non-root SSH account)也是可能的,但这个非根帐号必须能不需要输入密码执行 sudo 命令。
    

    ■ 设置服务帐号 (Set Up Service User Accounts)
    -------------------------------------------------------------------------------------------------------------------------------------    
    每个服务要求一个服务用户帐号(a service user account). Ambari 集群安装向导创建新的并保留已存在的服务用户帐号,并使用这些帐号配置Hadoop
    服务。
    
    在 Hadoop 中,每一个服务都运行在它们自己的 Unix 帐号所有者身份之下,这些帐号称之为服务用户(service user). 服务用户属于特定的 Unix 用户
    组 (Unix group). 可以在 Customize Services 安装步骤的 Misc 选项卡来自定义这些帐号和组。
    
    如果选择了自定义的帐号名, Ambari 会检查这些帐号是否存在。如果不存在 Ambari 会自动创建。安装过程中默认帐号总是会自动创建,不管是否指定
    了自定义帐号。如果默认帐号没有使用,可以在安装之后删除。
    
    注:服务帐号必须是 UID >= 1000
    
    
                                    Service Users
            +===================+=======================+===================================+
            | Service            | Component                | Default User Account                |
            +-------------------+-----------------------+-----------------------------------+
            | Accumulo            | Accumulo Tracer,        | accumulo                            |
            |                    | Accumulo Monitor,     | (HDP 2.2 or later)                |
            |                    | Accumulo GC, Accumulo    |                                    |
            |                    | Master                |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Ambari Metrics    | Metrics Collector,    | ams                                |
            |                    | Metrics Monitor        |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Ambari Infra        | Infra Solr Instance    | infra-solr                        |
            +-------------------+-----------------------+-----------------------------------+
            | Atlas                | Atlas Metadata Server    | atlas (HDP 2.3 or later)            |
            +-------------------+-----------------------+-----------------------------------+
            | Falcon             | Falcon Server            | falcon                            |
            +-------------------+-----------------------+-----------------------------------+
            | Flume                | Flume Agents            | flume                                |
            +-------------------+-----------------------+-----------------------------------+
            | HBase                | MasterServer            | hbase                                |
            |                    | RegionServer            |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | HDFS                | NameNode                 | hdfs                                |
            |                    | SecondaryNameNode     |                                    |
            |                    | DataNode                |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Hive                | Hive Metastore,         | hive                                |
            |                    | HiveServer2            |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | HUE                | HUE                    | hue                                |
            +-------------------+-----------------------+-----------------------------------+
            | Kafka                | Kafka Broker            | kafka                                |
            +-------------------+-----------------------+-----------------------------------+
            | Knox                | Knox Gateway            | knox                                |
            +-------------------+-----------------------+-----------------------------------+
            | Mahout            | Mahout clients        | mahout (HDP 2.2 or later)            |
            +-------------------+-----------------------+-----------------------------------+
            | MapReduce2        | HistoryServer            | mapred                            |
            +-------------------+-----------------------+-----------------------------------+
            | Oozie                | Oozie Server            | oozie                                |
            +-------------------+-----------------------+-----------------------------------+
            | PostgreSQL        | PostgreSQL             | postgres (Created as part of        |
            |                    |(with Ambari Server)    | installing the default PostgreSQL    |            
            |                    |                        | database with Ambari Server. If     |
            |                    |                        | you are not using    the Ambari        |
            |                    |                        | PostgreSQL database, this user is    |
            |                    |                        | not needed.)                        |
            +-------------------+-----------------------+-----------------------------------+
            | Ranger            | Ranger Admin,            |ranger (HDP 2.2 or later)            |
            |                    | Ranger Usersync        |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Ranger KMS        | Ranger KMS Server        | kms (HDP 2.3 or later)            |
            +-------------------+-----------------------+-----------------------------------+
            | Slider            | Slider clients        | slider                            |
            +-------------------+-----------------------+-----------------------------------+
            | SmartSense        | HST Server,            | <same as ambari agent>            |
            |                    | HST Agent,            |                                     |
            |                    | Activity Analyzer,    |                                    |
            |                    | Activity Explorer        |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Spark                | Livey Servers            | livy                                |
            +-------------------+-----------------------+-----------------------------------+
            | Spark                | Spark History Server    | spark (HDP 2.2 or later)            |
            +-------------------+-----------------------+-----------------------------------+
            | Sqoop                | Sqoop                    | sqoop                                |
            +-------------------+-----------------------+-----------------------------------+
            | Storm                | Masters (Nimbus,         | storm                                |
            |                    | DRPC Server,             |                                    |
            |                    | Storm REST API, Server|                                    |
            |                    | , Storm UI Server)     |                                    |
            |                    | Slaves (Supervisors,     |                                    |
            |                    | Logviewers)            |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Tez                | Tez clients            | tez                                |
            +-------------------+-----------------------+-----------------------------------+
            | WebHCat            | WebHCat Server        | hcat                                |
            +-------------------+-----------------------+-----------------------------------+
            | YARN                | NodeManager            | yarn                                |
            |                    | ResourceManager        |                                    |
            +-------------------+-----------------------+-----------------------------------+
            | Zeppelin Notebook    | Zeppelin Notebook        | zeppelin                            |
            +-------------------+-----------------------+-----------------------------------+
            | ZooKeeper            | ZooKeeper                | zookeeper                            |
            +-------------------+-----------------------+-----------------------------------+
    
        对于所有的组件来说,Smoke Test 用户为集群服务执行 smoke tests 作为安装过程的一部分。也可以在  Ambari Web UI 上按需执行。
        smoke test 的默认帐号为 ambari-qa
    
                                
                                Service Groups
            +===============+=======================+===============+
            | Service        | Components            | Default Group    |
            +---------------+-----------------------+---------------+
            | All            | All                    | hadoop        |
            +---------------+-----------------------+---------------+
            | Atlas            | Atlas Metadata Server    | atlas            |
            +---------------+-----------------------+---------------+
            | Knox            | Knox Gateway            | knox            |
            +---------------+-----------------------+---------------+
            | Ranger        | Ranger Admin,            | ranger        |
            |                | Ranger Usersync        |                |
            +---------------+-----------------------+---------------+
            | Ranger KMS    | Ranger KMS Server        | kms            |
            +---------------+-----------------------+---------------+
            | Spark            | Spark History Server    | spark            |
            +---------------+---------------------------------------+

    
    
    
    ■ 设置集群和浏览器主机上开机启动 NTP 服务 (Enable NTP on the Cluster and on the Browser Host)
    -------------------------------------------------------------------------------------------------------------------------------------
    集群上所有节点和运行浏览器访问 Ambari Web 接口的主机上的时钟必须彼此同步。在每部主机上安装 NTP 服务并确保其开机启动:
    
    RHEL/CentOS/Oracle 7 :
                            yum install -y ntp
                            systemctl enable ntpd

    Ubuntu :
            apt-get install ntp
            update-rc.d ntp defaults
    
    
    
    ■ 检查 DNS 和 NSCD (Check DNS and NSCD)
    -------------------------------------------------------------------------------------------------------------------------------------    
    系统上所有主机必须配置正向和反向 DNS .
    
    如果不能配置 DNS, 可以在集群的每部主机上编辑 /etc/hosts 文件包含集群每部主机的 IP 地址和全限定域名 (Fully Qualified Domain Name, FQDN)
    
    Hadoop 很大程度上依赖于 DNS, 正常操作中执行很多 DNS 查询。为了降低 DNS 负载,强烈建议在运行Lunix 的集群节点使用名称服务缓存守护进程(
    Name Service Caching Daemon, NSCD). 这个 daemon 会缓存 host, user, and group lookups, 提供更好的解析性能,并降低 DNS 负载。
    
        
        ● 编辑 /etc/hosts 文件(Edit the Host File)
        ---------------------------------------------------------------------------------------------------------------------------------
            ① vi /etc/hosts
            
            ② 为集群的每部主机添加一行,每行中包括 IP 地址和 FQDN:
                
                格式:IP <fully.qualified.domain.name>
                
                范例:192.168.1.103 namenode.sansovo.org
                
                ★ 重要提示:不要删除或改动 hosts 文件中下面两行,否则可能会导致各种需要网络的程序错误。
                    
                    127.0.0.1 localhost.localdomain localhost
                    ::1 localhost6.localdomain6 localhost6
                
        
        ● 设置主机名 (Set the Hostname)
        ---------------------------------------------------------------------------------------------------------------------------------
            ① 确认主机设置正确,执行:
                
                hostname -f
        
            ② 使用 "hostname" 命令设置主机名,执行:
            
                hostname <fully.qualified.domain.name>
                
        
        ● 编辑网络配置文件 (Edit the Network Configuration File)
        ---------------------------------------------------------------------------------------------------------------------------------
            ① vi /etc/sysconfig/network
        
            ② 修改 HOSTNAME 属性为 FQDN
    
    
        ● 启用 NSCD 服务
        ---------------------------------------------------------------------------------------------------------------------------------
        [root@ambari ~]# yum install -y nscd
        [root@ambari ~]# systemctl enable nscd
        [root@ambari ~]# systemctl start nscd

        配置文件:  vi /etc/nscd.conf
        查看:
        [root@ambari ~]# nscd -g

        
    ■ 配置防火墙 (Configuring iptables)
    -------------------------------------------------------------------------------------------------------------------------------------    
    Ambari 在设置主机部署和管理时需要和集群每部主机通信,要求某些端口必须打开并可用。最简单的方法是临时禁用防火墙:
    
    RHEL/CentOS/Oracle Linux 7 : systemctl disable firewalld
                                 service firewalld stop
    
    
                        Default Network Port Numbers - Ambari
        +===============+===================+=======================+===========+===================================================+
        | Service        | Servers            | Default Port            | Protocol    | Description                                        |
        +---------------+-------------------+-----------------------+-----------+---------------------------------------------------+
        | Ambari Server    | Ambari Server     | 8080                    | http        | Interface to Ambari Web and Ambari REST API        |
        +---------------+-------------------+-----------------------+-----------+---------------------------------------------------+
        | Ambari Server    | Ambari Server     | 8440                    | https        | Handshake Port for Ambari Agents to Ambari Server    |
        +---------------+-------------------+-----------------------+-----------+---------------------------------------------------+
        | Ambari Server    | Ambari Server     | 8441                    | https        | Registration and Heartbeat Port for Ambari Agents    |
        |                |                    |                        |            | to Ambari Server                                    |
        +---------------+-------------------+-----------------------+-----------+---------------------------------------------------+
        | Ambari Agent    | All hosts running    | 8670                    | tcp        | Ping port used for alerts to check the health of    |
        |                | Ambari Agents        | You can change the    |            | the Ambari Agent                                    |
        |                |                    | Ambari Agent ping port|            |                                                    |
        |                |                    | in the Ambari    Agent    |            |                                                    |
        |                |                    | configuration            |            |                                                    |
        +---------------+-------------------+-----------------------+-----------+---------------------------------------------------+


    
    ■ 禁用 SELinux 和 PackageKit 并检查 umask (Disable SELinux and PackageKit and check the umask Value)
    -------------------------------------------------------------------------------------------------------------------------------------
    ① Ambari 设置成功必须禁用 SELinux, 每部主机上执行:
        
        setenforce 0
        
        Note:
            要永久禁用 SELinux, 在 /etc/selinux/config 配置文件中设置 SELINUX=disabled, 这样保证机器重启时 SELinux 处于禁用状态。
    
    ② 如果 RHEL/CentOS 上安装了 PackageKit, 打开 /etc/yum/pluginconf.d/refresh-packagekit.conf, 设置:
        
        enabled=0
        
    ③ UMASK (User Mask or User file creation MASK) 为 Linux 机器上创建新文件或新文件夹设置默认权限或基本权限。很多 Linux 发布包将 UMASK
        默认设置为 022, umask 值为 022 授予新建的文件和文件夹具有读、写、执行的 755 权限。umask 值为 027 授予新建的文件和文件夹具有读、写、
        执行的 750 权限。
        
        Ambari, HDP, 和 HDF 支持 umask 值为 022 (0022 功能上相同), 027 (0027 功能上相同)。这些值必须在每部主机上设置。
        
        范例:
            设置当前登录会话的 umask
                umask 0022
                
            检查当前 umask
                umask
                
            修改所有用户 umask 设置
                echo umask 0022 >> /etc/profile


    ■ 下载和设置数据库连接器 (Download and set up database connectors)
    -------------------------------------------------------------------------------------------------------------------------------------
    像 Hive, Ranger, and Oozie 组件要求操作数据库。在安装过程中,可以选择使用现有数据库或对于 Hive 的情况,让 Ambari 安装一个新的实例,
    为了让 Ambari 连接到自己选择的数据库,需要在安装组件之前下载必要的数据库驱动和连接器,设置好连接数据库环境。


*
*
*

2. 使用本地库 ( Using a Local Repository )
-----------------------------------------------------------------------------------------------------------------------------------------
如果集群外网 internet 访问受限,应考虑使用本地仓库,可以拥有更多的控制并获得更好的安装性能。也可以使用本地仓库执行集群安装后的例行操作,
例如,启动和重启服务。使用本地仓库包括获取公共仓库(public repositories), 在无 internet 访问或有限 internet 环境设置仓库,并准备 Ambari
仓库配置文件来使用新的本地仓库。

步骤:
    (1) 获取公共仓库 (Obtain Public Repositories)
    (2) 设置本地仓库 (Set up a local repository)
        • 无 Internet 访问设置本地仓库 (Setting Up a Local Repository with No Internet Access)
        • 临时 Internet 访问设置本地仓库 (Setting up a Local Repository with Temporary Internet Access)
    (3) 准备 Ambari 仓库配置文件使用本地仓库 (Preparing the Ambari Repository Configuration File to Use the Local Repository)


2.1 设置本地仓库 ( Setting Up a Local Repository )
-----------------------------------------------------------------------------------------------------------------------------------------



    ■ 准备设置本地仓库 (Preparing to Set Up a Local Repository)
    -------------------------------------------------------------------------------------------------------------------------------------
    在设置本地仓库之前,必须满足一定的要求:
        
        ● 选择一个现有的机器作为镜像服务器(mirror server), 可以在集群内或者可以访问集群。
        ● 保证集群所有的主机可以访问到镜像服务器。
        ● 确保镜像服务器安装了包管理器,如, yum (for RHEL,CentOS, or Oracle Linux), zypper (for SLES), or apt-get (for Debian and Ubuntu).
        ● 可选的:如果仓库临时可以 Internet 访问,并且使用 RHEL, CentOS, 或 Oracle Linux 作为操作系统,安装 yum 工具:
            
            yum install yum-utils createrepo

    满足上述要求之后,可以按如下步骤准备设置本地仓库。
    
    步骤:
        ① 创建 HTTP 服务器:
            a. 在镜像服务器上安装 HTTP server, 例如, Apache httpd
            b. 启动服务器
            c. 确保防火墙设置允许集群节点到镜像服务器的 HTTP 入站访问
        
        ② 在镜像服务器上,为 web server 创建目录:
            
            RHEL/CentOS/Oracle Linux: mkdir -p /var/www/html/
            Debian/Ubuntu: mkdir -p /var/www/html/
        
            如果使用符号链接,web server 上 enable followsymlinks
 


    ■ 通过临时 Internet 访问设置本地仓库 (Setting up a Local Repository with Temporary Internet Access)
    -------------------------------------------------------------------------------------------------------------------------------------
    步骤:
    
        ① 在主机上为 Ambari 和安装栈安装仓库配置文件
        
            [root@ambari ~]# wget -P /etc/yum.repos.d/ http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari.repo
            [root@ambari centos7]# wget -P /etc/yum.repos.d/ http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/hdp.repo    
            
            http://public-repo-1.hortonworks.com/HDP-SOLR-3.0.0-100/repos/centos7/hdp-solr.repo
            
        ② 确认仓库可用
        
            RHEL, CentOS, or Oracle Linux: yum repolist
            
        ③ 同步仓库内容到镜像服务器
            
            ● 进入 web server 目录:
                
                RHEL, CentOS, or Oracle: cd /var/www/html
            
            ● 为 Ambari 创建 ambari 目录并执行仓库同步(reposync):
                
                mkdir -p ambari/<OS>
                cd ambari/<OS>
                reposync -r ambari-2.6.1.5
                
            上面语法中:<OS> is centos6, centos7, sles11, sles12, ubuntu14, ubuntu16, or debian7.
                
            范例:
                [root@ambari html]# mkdir -p ambari/centos7
                [root@ambari html]# cd ambari/centos7
                [root@ambari centos7]# reposync -r ambari-2.6.1.5

            ● 对于 Hortonworks Data Platform (HDP) stack 仓库,创建 hdp 目录并执行仓库同步
                mkdir -p hdp/<OS>
                cd hdp/<OS>
                reposync -r HDP-<latest.version>
                reposync -r HDP-UTILS-<version>
                
                mkdir -p hdp-gpl/<OS>
                cd hdp-gpl/<OS>
                reposync -r HDP-GPL-<latest.version>
                
            范例:
                [root@ambari centos7]# mkdir -p hdp/centos7
                [root@ambari centos7]# cd hdp/centos7
                [root@ambari centos7]# reposync -r HDP-2.6.4.0
                [root@ambari centos7]# reposync -r HDP-UTILS-1.1.0.22
                
                [root@ambari centos7]# mkdir -p hdp-gpl/centos7
                [root@ambari centos7]# cd hdp-gpl/centos7
                [root@ambari centos7]# reposync -r HDP-GPL-2.6.4.0
                
                
            ● 对于 HDF Stack 仓库, 创建 hdf 目录并执行仓库同步
                mkdir -p hdf/<OS>
                cd hdf/<OS>
                reposync -r HDF-<latest.version>
                
            范例:
                [root@ambari html]# mkdir -p hdf/centos7
                [root@ambari html]# cd hdf/centos7/
                

        ④ 生成仓库元数据:
            
            Ambari:    createrepo <web.server.directory>/ambari/<OS>/ambari-2.6.1.5
            HDP Stack Repositories: createrepo <web.server.directory>/hdp/<OS>/HDP-<latest.version>
                                    createrepo <web.server.directory>/hdp/<OS>/HDP-UTILS-<version>
                                    createrepo <web.server.directory>/hdp-gpl/<OS>/HDP-GPL-<latest.version>
            HDF Stack Repositories: createrepo <web.server.directory>/hdf/<OS>/HDF-<latest.version>
            
            范例:
                [root@ambari centos7]# createrepo /var/www/html/ambari/centos7/ambari-2.6.1.5
                [root@ambari centos7]# createrepo /var/www/html/hdp/centos7/HDP-2.6.4.0
                [root@ambari centos7]# createrepo /var/www/html/hdp/centos7/HDP-UTILS-1.1.0.22
                [root@ambari centos7]# createrepo /var/www/html/hdp-gpl/centos7/HDP-GPL-2.6.4.0
        
        ⑤ 确认可以通过浏览器看到新创建的仓库:
            
            Ambari Base URL        http://<web.server>/ambari/<OS>/Updates-Ambari-2.6.1.5
            HDP Base URL         http://<web.server>/hdp/<OS>/HDP-<latest.version>
            HDP-UTILS Base         URL http://<web.server>/hdp/<OS>/HDP-UTILS-<version>
            HDP-UTILS Base         URL http://<web.server>/hdp-gpl/<OS>/HDP-GPL-<latest.version>
            HDF Base URL         http://<web.server>/hdf/<OS>/HDF-<latest.version>
            
            <web.server>     - web server 主机的 FQDN
            <version>         – The Hortonworks stack 版本号
            <OS>             – centos6, centos7, sles11, sles12, ubuntu14, ubuntu16, or debian7
        
        范例:    
            http://ambari.sansovo.org/ambari/centos7/ambari-2.6.1.5/
            http://ambari.sansovo.org/hdp/centos7/HDP-2.6.4.0/
            http://ambari.sansovo.org/hdp/centos7/HDP-UTILS-1.1.0.22/
            http://ambari.sansovo.org/hdp-gpl/centos7/HDP-GPL-2.6.4.0
            
        提示:
            记录这些 base url, 安装 Ambari 和集群时需要这些 url
            
        
        ⑥ 可选的。如果环境中配置了多个仓库,集群的所有节点部署如下插件:
            a. 安装插件:
            
                RHEL and CentOS 7: yum install yum-plugin-priorities
                
            b. 编辑 /etc/yum/pluginconf.d/priorities.conf 文件添加如下内容:
            
                [main]
                enabled=1
                gpgcheck=0
        
    
    ■ 无 Internet 访问设置本地仓库 (Setting Up a Local Repository with No Internet Access)
    -------------------------------------------------------------------------------------------------------------------------------------    
    步骤:
        
        ① 获取仓库 tarball
            http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari-2.6.1.5-centos7.tar.gz
            http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/HDP-2.6.4.0-centos7-rpm.tar.gz
            http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz
        
        ② 拷贝 仓库 tarball 文件到 web server 目录并解包(untar) 存档文件
    
            a. 进入 web server 目录:
                
                RHEL, CentOS, or Oracle: cd /var/www/html
    
            b. untar 仓库 tarball 文件到相应位置
            
                Ambari 仓库 Untar 到 <web.server.directory> 之下.    
                HDP Stack 仓库:创建 <web.server.directory>/hdp 目录并 untar 到该目录之下.
                HDF Stack 仓库:创建 <web.server.direcotry>/hdf 目录并 untar 到该目录之下.
    
        ③ 确认可以通过浏览器看到新创建的仓库:
            
            Ambari Base URL        http://<web.server>/ambari-2.6.1.5/<OS>
            HDP Base URL         http://<web.server>/hdp/HDP/<OS>/2.x/updates/<latest.version>
            HDP-UTILS Base URL     http://<web.server>/hdp/HDP-UTILS-<version>/repos/<OS>
            HDF Base URL         http://<web.server>/hdf/HDF/<OS>/3.x/updates/<latest.version>
            
            <web.server>     - web server 主机的 FQDN
            <version>         – The Hortonworks stack 版本号
            <OS>             – centos6, centos7, sles11, sles12, ubuntu14, ubuntu16, or debian7
        
        范例:    
            http://ambari.sansovo.org/ambari-2.6.1.5/centos7/
            http://ambari.sansovo.org/hdp/HDP/centos7/2.x/updates/2.6.4.0/
            http://ambari.sansovo.org/hdp/HDP-UTILS-1.1.0.22/repos/centos7/

        提示:
            记录这些 base url, 安装 Ambari 和集群时需要这些 url
    
    
        ④ 可选的。如果环境中配置了多个仓库,集群的所有节点部署如下插件:
            a. 安装插件:
            
                RHEL and CentOS 7: yum install yum-plugin-priorities
                
            b. 编辑 /etc/yum/pluginconf.d/priorities.conf 文件添加如下内容:
            
                [main]
                enabled=1
                gpgcheck=0
                
                
2.2 准备 Ambari 仓库配置文件使用本地仓库 (Preparing the Ambari Repository Configuration File to Use the Local Repository)
-----------------------------------------------------------------------------------------------------------------------------------------    
步骤:
        
    ① 从公共仓库下载 ambari.repo 文件
        
        http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari.repo
    
    ② 编辑 ambari.repo 文件替换 Ambari Base URL baseurl 为本地仓库
        
        #VERSION_NUMBER=2.6.1.5-3
        [ambari-2.6.1.5]
        name=ambari Version - ambari-2.6.1.5
        baseurl=http://ambari.sansovo.org/ambari/centos7/ambari-2.6.1.5
        gpgcheck=0
        gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1

    Note:
         可以通过设置 gpgcheck =0 来禁用 GPG 检验。或者保持检验启用,将 gpgkey 设置为一个本地仓库的 GPG-KEY
    
    
    ③ 将 ambari.repo 文件放置到 Ambari server 主机上
    
        RHEL/CentOS/Oracle Linux:     /etc/yum.repos.d/ambari.repo


*
*
*

3. 获取公共仓库 (Obtaining Public Repositories)
-----------------------------------------------------------------------------------------------------------------------------------------


3.1 Ambari 仓库 (Ambari Repositories)
-----------------------------------------------------------------------------------------------------------------------------------------
如果 Ambari server 不能访问 internet,下载 tarball 存档文件,其内部包含安装 Ambari 的软件。
如果 Ambari server 可以临时访问 internet, 则使用仓库文件来安装 Ambari。


    RedHat 7, CentOS 7, Oracle Linux 7 :
    -------------------------------------------------------------------------------------------------------------------------------------
    Base URL    - http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5
    Repo File    - http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari.repo
    Tarball        - http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari-2.6.1.5-centos7.tar.gz



3.2 HDP Stack 仓库(HDP Stack Repositories)
-----------------------------------------------------------------------------------------------------------------------------------------


RedHat 7, CentOS 7, Oracle Linux 7 : HDP-2.6.4.0
-----------------------------------------------------------------------------------------------------------------------------------------
HDP:
    Version Definition File(VDF)- http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/HDP-2.6.4.0-91.xml
    Base URL                    - http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0
    Repo File                    - http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/hdp.repo
    Tarball                        - http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/HDP-2.6.4.0-centos7-rpm.tar.gz
    
HDP-UTILS:
    Base URL                    - http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7
    Tarball                        - http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz


HDP-GPL:
    URL                            - http://public-repo-1.hortonworks.com/HDP-GPL/centos7/2.x/updates/2.6.4.0/hdp.gpl.repo
    Tarball                     - http://public-repo-1.hortonworks.com/HDP-GPL/centos7/2.x/updates/2.6.4.0/HDP-GPL-2.6.4.0-centos7-rpm.tar.gz    
*
*
*

4. 安装 Ambari (Installing Ambari)
-----------------------------------------------------------------------------------------------------------------------------------------


4.1 下载 Ambari 仓库 (Download the Ambari Repository)
-----------------------------------------------------------------------------------------------------------------------------------------
在可以访问 internet 的主机上执行如下命令

步骤:    
    ① root 帐户登录主机
    
    ② 下载 Ambari 仓库文件到 yum 仓库目录
    
        wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari.repo -O /etc/yum.repos.d/ambari.repo
        
        不要修改 ambari.repo 文件名
        
    ③ 检查 repo 列表确认配置正确
    
        yum repolist
        
    
4.2 安装 Ambari Server (Install the Ambari Server)
-----------------------------------------------------------------------------------------------------------------------------------------

步骤:
    ① 安装 ambari-server, 也会安装默认的 PostgreSQL Ambari database
    
        yum install ambari-server
        
    ② 提示确认和依赖检查,输入 y
    

    
4.3 设置 Ambari Server (Set Up the Ambari Server)
-----------------------------------------------------------------------------------------------------------------------------------------
启动 Ambari Server 之前,必须设置 Ambari Server. 设置过程配置 Ambari 和 Ambari 数据库对话,安装 JDK 并允许自定义运行 Ambari Server daemon
的用户帐号。

运行下面指令启动设置进程,也可以在此命令后追加设置选项:
    
    ambari-server setup
    
设置提示响应:
    ① 如果没有临时禁用 SELinux, 会得到警告,接受默认值 (y), 继续
    ② 默认情况,Ambari Server 运行于 root 帐户。接受默认值 (n) 继续以 root 帐户运行。使用自定义帐户,选择 y
    ③ 如果没有禁用防火墙提示警告,输入 y 继续
    ④ 选择 JDK 版本下载。输入 1 下载 Oracle JDK 1.8 。另一种选择是输入自定义 JDK. 如果选择自定义 JDK, 需要手动安装 JDK 到所有主机上并设置
        Java Home 路径
        
    ⑤ 接受 Oracle JDK license, JDK 在部署阶段安装。
    ⑥ 查看 GPL license agreement. 为了明确 Ambari 下载并安装 LZO 数据压缩库文件,必须回答 y
    ⑦ Enter advanced database configuration [y/n] (n)? 出现时选择 n 使用默认的数据库配置,嵌入的 PostgreSQL. 默认的数据库名称为 ambari. 默认的用户名
        和密码为 ambari/bigdata . 否则,使用现有的 PostgreSQL, MySQL/MariaDB or Oracle 数据库,选择 y
        
    ⑧ 设置完成。
    
    
设置命令选项:

    下列选项经常用于 Ambari Server 设置命令
    
    -j(or --java-home)    : Specifies the JAVA_HOME path to use on the Ambari Server and all hosts in the cluster. By default when you do not
                        specify this option, Ambari Server setup downloads the Oracle JDK 1.8 binary and accompanying Java Cryptography
                        Extension (JCE) Policy Files to /var/lib/ambari-server/resources. Ambari Server then installs the JDK to /usr/jdk64.
                        Use this option when you plan to use a JDK other than the default Oracle JDK 1.8. If you are using an alternate JDK,
                        you must manually install the JDK on all hosts and specify the Java Home path during Ambari Server setup.
                        
                        If you plan to use Kerberos, you must also install the JCE on all hosts. This path must be valid on all hosts.
                        For example:
                            ambari-server setup –j /usr/java/default
        
    
    --jdbc-driver        : Should be the path to the JDBC driver JAR file. Use this option to specify the location of the JDBC driver JAR and
                        to make that JAR available to Ambari Server for distribution to cluster hosts during configuration.
                        Use this option with the --jdbc-db option to specify the database type.
        
    --jdbc-db            : Specifies the database type. Valid values are: [postgres | mysql | oracle] Use this option with the --jdbc-driver
                        option to specify the location of the JDBC driver JAR file.    
        
    -s (or --silent)    : Setup runs silently. Accepts all the default prompt values, such as:
                            • User account "root" for the ambari-server
                            • Oracle 1.8 JDK (which is installed at /usr/jdk64). This can be overridden by adding the -j option and specifying
                            an existing JDK path.
                            • Embedded PostgreSQL for Ambari DB (with database name "ambari")    
    
    --enable-lzo-under-gpl-license    : Use this option to download and install LZO compression, subject to the General Public License.
    
    -v (or --verbose)    : Prints verbose info and warning messages to the console during Setup.
    
    -g (or --debug)     : Prints debug info to the console during Setup.
    
    
    
    
*
*
*

5. 使用管理包 (Working with Management Packs)
-----------------------------------------------------------------------------------------------------------------------------------------
管理包允许部署一系列服务到 Ambari-managed 的集群上。可以使用管理包部署一个特定的组件或服务,或者部署整个平台。

一般情况下,使用管理包工作,按序执行下列任务:

    (1) 安装管理包
    (2) 在 Ambari 中更新仓库 URL
    (3) 启动 Ambari Server
    (4) 运行 Ambari 安装向导




*
*
*

6. 安装、配置、部署集群 (Installing, Configuring, and Deploying a Cluster)
-----------------------------------------------------------------------------------------------------------------------------------------
使用运行于浏览器的 Ambari 集群安装向导安装、配置、部署集群,如下所示:

    ● 启动 Ambari Server
    ● 登录 Ambari
    ● 启动 Ambari 集群安装向导
    ● 命名集群
    ● 选择版本
    ● 安装选项
    ● 确认主机
    ● 选择服务
    ● 分配 masters
    ● 分配 slaves 和 clients
    ● 自定义服务
    ● 回顾配置(Review)
    ● 安装,启动,测试
    ● 完成


6.1 启动 Ambari Server (Start the Ambari Server)
-----------------------------------------------------------------------------------------------------------------------------------------

    ● 运行如下命令启动 Ambari Server
        
        ambari-server start
        
    ● 检查 Ambari Server 进程状态
        
        ambari-server status
        
    ● 停止 Ambari Server
    
        ambari-server stop
        
    Note:
        如果计划为 Hive 或 Oozie 使用已有的数据库实例,必须在安装 Hadoop 集群之前准备使用现有数据库。

    
    启动 Ambari Server 时,Ambari 运行数据库一致性检查查看是否有问题。如果发现任何问题,Ambari Server 退出启动,并显示如下信息:
    
        DB configs consistency check failed.
    
    Ambari 将数据库检查结果有关细节写入 the/var/log/ambari-server/ambari-server-checkdatabase.log 文件。
    
    可以强制 Ambari Server 启动时跳过一致性检查:
    
        ambari-server start --skip-database-check
        
    如果数据库有问题,选择跳过检查,不要对集群拓扑做任何改变,或者执行集群升级,直到改正数据库一致性问题。


6.2 登录 Ambari (Log In to Apache Ambari)
-----------------------------------------------------------------------------------------------------------------------------------------

步骤:
    ① web browser 指向:
        
        http://<your.ambari.server>:8080

    ② 使用默认的用户名/密码:admin/admin 登录 Ambari Server。对于新的集群,集群安装向导会显示一个欢迎页



6.3 启动 Ambari 集群安装向导 (Launch the Ambari Cluster Install Wizard)
-----------------------------------------------------------------------------------------------------------------------------------------
在 Ambari 欢迎页,选择 Launch Install Wizard



6.4 命名集群 (Name Your Cluster)
-----------------------------------------------------------------------------------------------------------------------------------------
步骤:
    ① 在 Name your cluster, 输入要创建的集群名称:不要在名称里使用空格或特殊字符
    ② 选择 Next
    
    
6.5 选择版本 (Select Version)
-----------------------------------------------------------------------------------------------------------------------------------------
这一步,要选择软件版本和集群软件传递方法。使用公共仓库要求有 internet 连接,使用本地仓库要求本地仓库配置的相关软件在本地网络可用。
    

    
6.5.1 选择安装栈(Choosing Stack)
-----------------------------------------------------------------------------------------------------------------------------------------    
    可用版本展示在选项卡上。选择一个选项卡, Ambari 尝试找到选定版本的可用安装栈,以下拉列表的形式显示结果。选择一个安装栈版本,可用的服务
    及其对应的版本号显示在表格中。
        
    
    ● 选择版本(Choosing Version)
    -------------------------------------------------------------------------------------------------------------------------------------
    如果 Ambari 可以访问 internet, 选定安装栈的版本以下拉列表形式展示。如果有一个版本定义文件(Version Definition File)没有列出来,可以单击
    Add Version... 并上传 VDF 文件。选项 Default Version Definition 也包含在列表中,如果不能访问internet 或不确定安装哪个版本,可选择此项。
    
    
    
    ● 选择仓库(Choosing Repositories)
    -------------------------------------------------------------------------------------------------------------------------------------    
    Ambari 安装软件可以选择从公共仓库安装或从本地仓库安装。不管哪种选择,都可以编辑仓库的 Base URL. 支持的操作系统也显示在列表中,可以在
    列表上添加/删除操作系统来满足自己的环境。
    
    
    Next
    
    
    
6.5.2 安装选项 (Install Options)
-----------------------------------------------------------------------------------------------------------------------------------------    
为了构建集群,集群安装向导提示设置一些总体信息。需要提供每部主机的完全限定域名(FQDN). 需要访问创建无密码 SSH 登录的私钥文件。有了主机名和
密钥信息,向导就可以定位、访问集群的所有主机并与它们进行安全交互。

步骤:
    ① 在 Target Hosts 中,输入主机名列表,一行一个
        可以在中括号中指定一个范围来指定比较大型的主机集,如指定从 host01.domain 到 host10.domain 的所有主机名,使用 host[01-10].domain
    
    ② 如果让 Ambari 使用 SSH 自动安装 Ambari Agent 到所有主机上,选择 Provide your SSH Private Key, 然后或者使用 Choose File 按钮选择之前
        安装在所有主机上的公钥匹配的私钥文件,或者手动复制私钥粘贴到文本框内。
    
    ③ 输入选择的 SSH key 用户名。如果不使用 root 帐号,必须提供可以不需要提供密码执行 sudo 命令的帐号用户名。如果主机环境配置的 SSH 使用
        非默认的 22 端口,也在这里修改。
        
    ④ 如果不要 Ambari 自动安装 Ambari Agents, 选择 Perform manual registration
    
    ⑤ 选择 Register and Confirm 继续
    
    
    
6.5.3 确认主机 (Confirm Hosts)
-----------------------------------------------------------------------------------------------------------------------------------------    
确认主机指示确认 Ambari 已为集群定位到正确的主机并检查这些机器它们有正确的目录,包,以及可以继续安装要求的进程。如果任何主机遇到错误,可以
通过选择选项框并单击灰色的 Remove Selected 按钮删除主机。删除单个主机,在 Action 列单击小的白色 Remove 按钮。
    
在界面底部,可以注意到黄色文本框指出一些检查过程中遇到的 warning 信息。

    
可能遇到确认失败错误

查看日志文件:
-----------------------------------------------------------------------------------------------------------------------------------------
[root@worker-1 ~]# cat /var/log/ambari-agent/ambari-agent.log    

......

ERROR 2018-05-04 14:05:48,667 main.py:244 - Ambari agent machine hostname (worker-1.sansovo.org.1.168.192.in-addr.arpa) does not match
expected ambari server hostname (worker-1.sansovo.org). Aborting registration. Please check hostname, hostname -f and /etc/hosts file to
confirm your hostname is setup correctly

.....

原因:可能 DNS 未设置 IPv6 地址所致

解决方法:
-----------------------------------------------------------------------------------------------------------------------------------------
[root@worker-1 ~]# vi /etc/hosts    
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         worker-1.sansovo.org localhost localhost.localdomain localhost6 localhost6.localdomain6

    
主机确认成功之后

    Next
    
    
6.5.4 选择服务 (Choose Services)
-----------------------------------------------------------------------------------------------------------------------------------------    
根据在 Select Stack 步骤的选择,会显示可供选择的各种服务以安装到集群上。安装栈包含很多服务,可以现在选择要安装的任何服务,也可以后增加服务。
默认情况下,集群安装向导选择所有可用的服务进行安装。

从 Ambari 2.5 开始, SmartSense 部署是强制的。不能使用安装向导清除安装 SmartSense 选项。

    Next

    
6.5.5 分配主控服务 (Assign Masters)
-----------------------------------------------------------------------------------------------------------------------------------------    
集群安装向导为已选定的服务主控组件(master component)分配集群中合适的主机。左边的列显示服务和当前主机,邮编的列显示主机分配的主控组件,指明
CPU 线程数量和每部主机内存数量。

    ① 改变某个服务的主机分配,从下拉菜单中选择另一部主机。
    
    ② 要移除一个 ZooKeeper 实例,单击主机地址旁边绿色图标 (green - icon)
    
    ③ 分配满意后, 选择 Next
    


6.5.6 分配辅助组件和客户端 (Assign Slaves and Clients)
-----------------------------------------------------------------------------------------------------------------------------------------
集群安装向导分配辅助组件,例如 DataNodes, NodeManagers, 以及 RegionServers, 分配到集群的合适主机上。也会尝试选择主机来安装适当的客户端集

步骤:
    ① 使用 all 或 none 来选择某一列的所有主机或清空该列所有主机。如果主机名之后有一个星号 * , 表明这个主机运行一个或多个 master 组件。
        
    ② 使用选项框微调主机选项
    
    ③ 分配满意后,选择 Next
    
    

6.5.7 自定义服务 (Customize Services)
-----------------------------------------------------------------------------------------------------------------------------------------
自定义服务这一步表现为一组选项卡来查看和修改集群设置。集群安装向导尝试为每个选项设置有意义的默认值。当有不同需求时,强烈建议查看这些设置值

可以浏览每个服务选项卡。显示的服务选项卡数量取决于决定在集群上安装多少服务。任何要求输入值的选项卡显示为一个红色标记和一个数值属性需要引以
注意。选择带有红色标记的选项卡并输入适当的信息。


    ● 目录(Directories)
    -------------------------------------------------------------------------------------------------------------------------------------
    选择目录来存储信息至关重要。 Ambari 基于当前环境可用的挂载点选择有意义的默认值,但要仔细查看 Ambari 建议的默认目录设置。特别是,确认
    /tmp 和 /var 不要用于 HDFS 的 NameNode 目录和 DataNode 目录。
    
    
    ● 密码(Passwords)
    -------------------------------------------------------------------------------------------------------------------------------------
    必须提供服务的数据库密码:Hive 和 Oozie 服务, Master Secret for Knox, Grafana 数据库 password 。以 Hive 为例,选择 Hive 选项卡并展开
    Advanced 部分。数据库密码字段标记为红色,输入密码,在确认框再输入一遍,确认两次输入一致。


    ● 服务帐号和组(Service Account Users and Groups)
    -------------------------------------------------------------------------------------------------------------------------------------
    服务帐号和组在 Misc 选项卡。这些是服务组件运行使用的操作系统帐号。如果主机上不存在这些用户帐号, Ambari 会在机器上自动创建本地帐号和组。
    如果帐号已经存在, Ambari 会使用这些以存在帐号。
    
    取决于现有环境是如何配置的,可能不允许使用 groupmod 或 usermod 操作。如果是这种情况,必须确保所有的用户和组都已经创建好了,并确保在Misc
    选项卡中选择 Skip group modifications 选项。这样告知 Ambari 不要为服务帐号修改组成员。
    
    
完成自定义设置之后,选择 Next



6.5.8 信息回顾 (Review)
-----------------------------------------------------------------------------------------------------------------------------------------
Review 显示之前所做的分配工作。检查确认每项配置都正确了。如果需要改动设置,利用左侧的导航条返回到适当的步骤进行设置。

选择 Print 可以打印信息用于以后参考。

所有配置满意之后,选择 Deploy.



6.5.9 安装、启动及测试 (Install, Start and Test)
-----------------------------------------------------------------------------------------------------------------------------------------
安装过程显示在屏幕上。 Ambari 安装,启动每个组件,并在组件上运行一个简单的测试。总体过程的状态显示在顶部的进度条上,每部主机的状态显示在
主窗口部分。安装过程中不要刷新浏览器。刷新可能中断进度指示器。

查看每部主机任务完成的特定信息,单击 Message 列的主机链接。在弹出的 Task 菜单上单击要查看的任务相关日志文件。可以通过 Show 下拉列表选择
过滤条件。要查看更大版本的日志内容,单击 Open 或单击 Copy 复制内容到剪切板。

当出现 Successfully installed and started the services 时,选择 Next




6.5.10 完成 (Complete)
-----------------------------------------------------------------------------------------------------------------------------------------
Summary 页提供了一个完成任务的摘要列表,选择 Complete
 

浏览器打开 Ambari Web:

http://<your.ambari.server>:8080

 

 

 


安装过程遇到的错误:
-----------------------------------------------------------------------------------------------------------------------------------------
    1. zookeeper 安装失败:
    The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging.

    先部署一个 zookeeper, 将 zookeeper 和 client 安装到同一部主机。安装好之后,再单独部署 zookeeper 为计划的数量。个别主机在部署 zookeeper
    时也可能会发生装不上的问题,换一台干净的主机安装试试。总之,zookeeper 比较敏感,部署时尽量保证系统干净。
 

 

 

 

Ambari2.7+HDP3.0安装(基于Centos7) 1.Ambari简介 Apache Ambari项目旨在通过开发用于配置,管理和监视Apache Hadoop集群的软件来简化Hadoop管理。Ambari通过其RESTful API提供了直观,易于使用的Hadoop管理Web UI。 Ambari使系统管理员可以: 设置Hadoop集群 Ambari提供了用于在任意数量的主机上安装Hadoop服务的分步向导。 Ambari处理群集的Hadoop服务的配置。 管理Hadoop集群 Ambari提供了用于在整个集群中启动,停止和重新配置Hado 阅读详情

相关推荐

centos7安装Ambari 2.7.5 + HDP3.1.5

准备 1.安装包准备: Ambari2.7.5、HDP31.5、libtirpc-devel: centos7操作系统: 链接:https://pan.baidu.com/s/1vzvio5rAMsbYF0-0vBs5dw 提取码:xij9

kxq的博客 5092

CentOS安装HDP集群 遇到的问题记录

这里主要记录一下安装hdp集群时遇到的问题。 看过我博客的可能会知道我之前装的是Ambari2.6.2,HDP2.6.5,安装到这里出现各种问题,后来领导说版本低,自己就直接重装并提高了版本,安装的是最新版Ambari2.7.3和HDP3.1.0,系统CentOS7.2。 前面安装过程都差不多,就不说了,到这里依然有各种错误。这里就记录下遇到的错误。 错误1. ambari自动在我的/etc/yu...

蜗牛小将 1万+

CentOS7.8安装Ambari2.7.4

学而时习之,不亦说乎。由于工作需要,需要现搭建大数据测试环境,就快速攒了一个,记录一下过程。 这次用的是Ambari2.7.4,因为2.7.5有些资源下载不了,用它的原因就是图方便,赶时间,可以快速搭建平台,稳定性也不错。 主要参考了官方文档,仔细参照着部署是可以成功的,由于要使用国内镜像,还是有些不同,记录下来,当做总结。 文档地址:https://docs.cloudera.com/HDPDocuments/Ambari/Ambari-2.7.4.0/index.html 开始之前先查看支持列表

唐震宇的博客 2523

CentOS7+Ambria2.6.1.0+HDP2.6.4.0安装详细步骤

Ambria安装 1.环境准备 (在master,slave1,slave2,slave3) 1.1. 环境说明 master slave1 slave2 slave3 主机名 master.ambria.com slave1.ambria.com slave2.ambria.com slave3.ambria.com IP 192.168.18.140 192.168.18...

weixin_39565641的博客 2528

Ambari安装简介

Ambari 介绍 Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应、管理和监控。Ambari已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeper、Sqoop和Hcatalog等。 Apache Ambari 支持HDFS、MapReduce、Hive、Pig、Hbase、Zookeper、S...

XiaodunLP的博客 9120

HDP3.1.5.0+Ambari2.7.5安装部署(Centos7.2)

Centos7.2下载地址:http://archive.kernel.org/centos-vault/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-1511.isoCentos7.2安装教程:http://1130739.blog.51cto.com/1120739/1738791附:CentOS官网历史发行版本下载地址:http://archive.ker...

小强签名设计 的博客 7235

在ambari上搭建yarn报错处理办法

报错: 解决办法: sudo chown -R ambari /var/run/ambari-server 原因:ambari-server安装有问题!

方法属性类,一个都不会 837

centos7 ambari2.6.1.5+hdp2.6.4.0 大数据集群安装部署

转载请务必注明原创地址为:http://dongkelun.com/2018/04/25/ambariConf/ 前言 本文是讲如何在centos7(64位) 安装ambari+hdp,如果在装有原生hadoop等集群的机器上安装,需要先将集群服务停掉,然后将不需要的环境变量注释掉即可,如果不注释掉,后面虽然可以安装成功,但是在启动某些服务的时候可能会有异常,比如最后提到的hive启动异常...

主要分享大数据相关的知识,如Spark、Hudi 6255

【Ambari】Build and install Ambari 2.7.5

文章目录环境准备1. download and build1.1 download1.1.1 下载源码包(清华镜像)1.1.2 mvn versions:set -DnewVersion=2.7.5.0.01.1.3 pushd ambari-metrics1.1.4 mvn versions:set -DnewVersion=2.7.5.0.01.1.5 popd1.2 build1.3 bui...

人生所向,皆是美好 1万+

Ambari系列(2)—— Ambari安装和维护问题汇总

版本问题,其实真正的原因是hdp的yum元数据缓存没有创建成功。其实是hdp的yum元数据缓存版本没有配置好。将3.1.4.0改为3.1。根据报错信息,会以为是。

shangjg3的博客 589

latest.apk

latest.apk

Apache Ambari-2.7.3+Centos7离线安装

1. 介绍 1.1 Ambari Ambari 跟 Hadoop 等开源软件一样,也是 Apache Software Foundation 中的一个项目,并且是顶级项目。就 Ambari 的作用来说,就是创建、管理、监视 Hadoop 的集群,但是这里的 Hadoop 指的是 Hadoop 整个生态圈(例如 Hive,Hbase,Sqoop,Zookeeper 等), 而并不仅是特指 Hado...

TT-Learning 2万+

【DSP】【工程实战】从零构建C6678多核工程:CCS环境配置与启动模式详解

本文详细介绍了在CCS开发环境中从零构建TMS320C6678多核DSP工程的完整流程。内容涵盖KeyStone架构解析、工程创建、基础代码编写、链接命令文件配置、仿真器调试,并重点深入讲解了包括I2C EEPROM在内的多种一级启动模式原理与配置方法,为开发者提供了一套清晰、可复用的实战指南。

weixin_29164185的博客 420

Ambari搭建Hadoop集群 — — 问题总结

参考硬盘:master(29 GB)、slave1(29 GB)、slave2(29 GB)内存:master(4 GB)、slave1(2 GB)、slave2(2 GB)处理器:master(1个处理器,4个内核)、slave1(1个处理器,2个内核)、slave2(1个处理器、2个内核)推荐配置硬盘:master(30 GB)、slave1(25 GB)、slave2(25 GB)内存:master(4 GB)、slave1(2 GB)、slave2(2 GB)

SoyMilk的博客 2096

用ESP32和HomeSpan自制HomeKit智能灯,手把手教你从零接入苹果家庭App

本文详细介绍了如何使用ESP32开发板和HomeSpan开源库自制原生HomeKit智能灯,从硬件搭建到软件配置,再到通过苹果家庭App控制的全过程。项目绕过了苹果MFi认证,成本低廉但功能完整,支持Siri语音控制、自动化场景等高级功能,是智能家居DIY的实用指南。

weixin_28717431的博客 325

Qt加载百度地图详细流程(附带报错解决方法)

一篇文章看懂Qt如何加载出百度地图......

qq_60018273的博客 1607

CentOS7.6下安装Ambari

一、准备工作 1.1、准备三台CentOS 1.2、配置静态IP、DNS vi /etc/sysconfig/network-scripts/ficfg-ens33 IPADDR为 配置的ip NETMASK 子网掩码 GATEWAY 网关 配置保存后重启虚拟网络 service network restart 1.3、配置Hostname vi /etc/hostname #将第一行替换成新名字 master 配置hosts文件 vi /etc/hosts 192.168.75.131 mast

栗筝i的博客 3842

国内合规开通ChatGPT Plus实操指南:银行卡绑卡与支付全解析

ChatGPT Plus 是 OpenAI 官方推出的高级订阅服务,基于 GPT-4o 多模态大模型提供语音交互、图像理解与长上下文处理能力。其核心使用前提在于完成合规的国际支付绑定,而非网络接入方式。技术原理上,OpenAI 采用 Stripe 支付网关进行风控校验,重点匹配银行跨境权限、卡片类型(仅支持 Visa/Mastercard/Amex 信用卡)、BIN 号段及地理位置一致性。该机制决定了95%的绑卡失败源于银行端配置缺失或卡片不兼容,而非网络问题。实际应用中,PayPal 作为中间支付层可显著

chuannaoxuan4674的博客 2007

【Ambari】Ambari搭建Hadoop集群

【Ambari】Ambari搭建Hadoop集群配置说明基础环境修改主机名和hosts文件关闭防火墙和selinuxjdk下载配置yum 离线安装 mysql免密操作:使 ambari-server 节点免密操作 ambari-agent 节点hadoop 各节点主机保持始终同步主节点从节点安装配置 ambari-server搭建 yum 本地源mysql 用户设置使用 yum 安装 ambari...

Hombre sin rostro的博客 1435

MNI152 坐标空间和 fsaverage 坐标空间相互转换, 如已知fsaverage空间的坐标如何求MNI152 坐标?aparc.a2009s.annot转化到MNI152空间?

大多数神经影像学研究的结果是在体积(例如,MNI152)或表面(例如,fsaverage)坐标系中报告的。体积坐标系和表面坐标系之间的准确映射可以促进许多应用,例如将 fMRI 组分析从 MNI152 投影到 fsaverage 以进行可视化或从 fsaverage 投影静息状态 fMRI 分区对 MNI152进行新数据的体积分析。Wu et al., 2018 评估了三种在 MNI152通过模拟上述应用的 Colin27 和 fsaverage 坐标系:将组平均数据从 MNI152/Colin27 投影到

从事脑科学核磁共振方法学研究,在Nature communications等权威期刊发表研究论文,熟练掌握磁共振处理方法和统计学方法,欢迎大家和我交流。 2966

蓝牙协议栈详解(3)——BTstack

BTstack是一个轻量级蓝牙协议栈,支持经典蓝牙(BR/EDR)和低功耗蓝牙(BLE)。它采用事件驱动模型,可运行在MCU/CPU上,通过HCI接口与蓝牙控制器通信。协议栈包含完整的蓝牙协议层支持,如L2CAP、RFCOMM、ATT/GATT等,并提供丰富的示例代码。 主要特点包括模块化设计、开源授权、支持多种HCI传输方式(UART/USB)和操作系统适配。开发时需要关注事件驱动编程模型、内存配置优化、HCI传输稳定性等问题。典型应用场景包括SPP串口通信、BLE外设开发等。 使用建议从最小示例开始,逐

嵌入式软硬件叶玄 296

基于Ambari的Hadoop集群的搭建(下)

基于ambari的Hadoop集群的搭建

m0_74973672的博客 1747

在SAP系统中创建物料 860000000000000082(物料描述为“8680月球广寒宫坦克车”)时,系统报出了一个错误

摘要:SAP系统创建物料"8680月球广寒宫坦克车"时出现"C+020"错误,提示评估区域C916未在物料分类账中设置为生产性。解决方案需进入"会计-控制-产品成本控制-实际成本核算"路径,将评估区域C916手动设置为生产性状态。该操作需由具备权限的系统管理员或FICO顾问执行,建议操作前进行数据备份或在测试环境验证。完成设置后即可重新创建物料。

金牌架构师 393

centos7安装ambari(亲自安装流程)

环境:centos7与centos6一样只是centos6与7有一些命令不一样,在centos6上安装请注意更换命令 刚安装完的centos7,所以我这上面缺少一些功能,后续会在使用中下载 先下载文件,很大 提前下载 http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.2/ambari-2.6.2.2-cent...

weixin_42348946的博客 9872

【大模型】AI 辅助编程操作实战使用详解

AI 编程实战使用详解

congge 8463

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

Ambari2.7.5-HDP3.1.5集群离线搭建

文章目录

TT-Learning 3437

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

上一篇: Hadoop 系统管理 (Administering Hadoop)
下一篇: Ambari 系统管理 (Ambari Administration) 之一
devalone
博客等级 码龄17年 108粉丝 80原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值