• Install Ambari 2.2.0 from Public Repositories(Hadoop)


     

    Step1: Download the Ambari repository on the Ambari Server host

    For Redhat/CentOS/Oracle:
      cd /etc/yum.repos.d/
      wget <ambari-repo-url>
     
    For SUSE:
      cd /etc/zypp/repos.d
      wget <ambari-repo-url>
     
    For Ubuntu/Debian:
      cd /etc/apt/sources.list.d
      wget <ambari-repo-url>

    Choose an appropriate <ambari-repo-url> based on the platform used:

    https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_Installing_HDP_AMB/content/_ambari_repositories.html

    Ambari 2.2 Repositories

    OS Format URL

    RedHat 6

    CentOS 6

    Oracle Linux 6

    Base URL http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.0.0
    Repo File http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.0.0/ambari.repo
    Tarball md5 |asc http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.0.0/ambari-2.2.0.0-centos6.tar.gz

    RedHat 7

    CentOS 7

    Oracle Linux 7

    Base URL http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.0.0
    Repo File http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.0.0/ambari.repo
    Tarball md5 |asc http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.0.0/ambari-2.2.0.0-centos7.tar.gz
    SLES 11 Base URL http://public-repo-1.hortonworks.com/ambari/suse11/2.x/updates/2.2.0.0
    Repo File http://public-repo-1.hortonworks.com/ambari/suse11/2.x/updates/2.2.0.0/ambari.repo
    Tarball md5 |asc http://public-repo-1.hortonworks.com/ambari/suse11/2.x/updates/2.2.0.0/ambari-2.2.0.0-suse11.tar.gz
    Ubuntu 12 Base URL http://public-repo-1.hortonworks.com/ambari/ubuntu12/2.x/updates/2.2.0.0
    Repo File http://public-repo-1.hortonworks.com/ambari/ubuntu12/2.x/updates/2.2.0.0/ambari.list
    Tarball md5 |asc http://public-repo-1.hortonworks.com/ambari/ubuntu12/2.x/updates/2.2.0.0/ambari-2.2.0.0-ubuntu12.tar.gz
    Ubuntu 14 Base URL http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.0.0
    Repo File http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.0.0/ambari.list
    Tarball md5 |asc http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.0.0/ambari-2.2.0.0-ubuntu14.tar.gz
    Debian 7 Base URL http://public-repo-1.hortonworks.com/ambari/debian7/2.x/updates/2.2.0.0
    Repo File http://public-repo-1.hortonworks.com/ambari/debian7/2.x/updates/2.2.0.0/ambari.list
    Tarball md5 |asc http://public-repo-1.hortonworks.com/ambari/debian7/2.x/updates/2.2.0.0/ambari-2.2.0.0-debian7.tar.gz

    Step 2: Install, Setup, and Start Ambari Server

    Install Ambari Server from the public Ambari repository:

    For Redhat/CentOS/Oracle:
      yum install ambari-server
     
    如果遇到 Another app is currently holding the yum lock; waiting for it to exit. 可以通过执行rm -rf /var/run/yum.pid 来强行解除锁定
     
    For SUSE:
      zypper install ambari-server
     
    For Ubuntu/Debian:
      apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
      apt-get update
      apt-get install ambari-server

    Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:

    ambari-server setup

    Fixed a warnings:

    --------------------------------------------------------------

    A. Close SELinux:

    1、临时关闭(不用重启机器):

    setenforce 0                  ##设置SELinux 成为permissive模式

                                  ##setenforce 1 设置SELinux 成为enforcing模式

    2、修改配置文件需要重启机器:

    修改/etc/selinux/config 文件

    将SELINUX=enforcing改为SELINUX=disabled

    重启机器即可

    --------------------------------------------------------------------------

    --------------------------------------------------------------------------

     B. Close iptables

    1. Linux防火墙(Iptables)重启系统生效

    1. 开启: chkconfig iptables on  
    2.  
    3. 关闭: chkconfig iptables off  
    4.  

    2.Linux防火墙(Iptables) 即时生效,重启后失效

    1. 开启: service iptables start  
    2.  
    3. 关闭: service iptables stop  
    4.  

    --------------------------------------------------------------------------

    Start Ambari Server:

    ambari-server start

    Step 3: Deploy Cluster using Ambari Web UI

    Open up a web browser and go to http://<ambari-server-host>:8080.

    Log in with username admin and password admin and follow on-screen instructions.

    ssh 无密码登录要使用公钥与私钥。linux下可以用用ssh-keygen生成公钥/私钥对,下面我以CentOS为例。
    有机器A(192.168.1.155),B(192.168.1.181)。现想A通过ssh免密码登录到B。 首先以root账户登陆为例。

    1.在A机下生成公钥/私钥对。

    [root@A ~]# ssh-keygen -t rsa -''

    -P表示密码,-P '' 就表示空密码,也可以不用-P参数,这样就要三车回车,用-P就一次回车。 该命令将在/root/.ssh目录下面产生一对密钥id_rsa和id_rsa.pub。

    一般采用的ssh的rsa密钥: id_rsa     私钥 id_rsa.pub 公钥 下述命令产生不同类型的密钥 ssh-keygen -t dsa ssh-keygen -t rsa ssh-keygen -t rsa1
    2.把A机下的/root/.ssh/id_rsa.pub 复制到B机的 /root/.ssh/authorized_keys文件里,先要在B机上创建好 /root/.ssh 这个目录,用scp复制。

    [root@A ~]# scp /root/.ssh/id_rsa.pub root@192.168.1.181:/root/.ssh/authorized_keys root@192.168.1.181's password: id_rsa.pub                                    100%  223     0.2KB/s   00:00

    由于还没有免密码登录的,所以要输入一次B机的root密码。
    3.authorized_keys的权限要是600!!!

    [root@B ~]# chmod 600 /root/.ssh/authorized_keys
    [dave@caprice dave]$ ssh 192.168.1.3 -v
      [I edited out the verbose output, and entered the password]
      [Remember kids, always use -v so dont try this at home :) ]
    
    [dave@julia dave]$ mkdir .ssh
    [dave@julia dave]$ chmod 700 .ssh
    [dave@julia dave]$ cd .ssh
    [dave@julia .ssh]$ touch authorized_keys
    [dave@julia .ssh]$ chmod 600 authorized_keys
    [dave@julia .ssh]$ cat ../identity.pub >> authorized_keys
    [dave@julia .ssh]$ rm ../identity.pub

    //错误:INFO 2016-01-07 11:52:03,525 NetUtil.py:60 - Connecting to https://ha0.ggz.bluefir:8440/ca的解决方法:

    如果已经错了,可以去每台机器/etc/ambari-agent/conf/ambari-agent.ini修改ambari-server主机信息

     

    //设置jdk:ambari-server setup -j /opt/jdk1.8/

    //解决openssl错误:yum update openssl


    //手工安装ambari-agent的步骤

    RHEL/CentOS/Oracle Linux 6

    1. Install the Ambari Agent on every host in your cluster.

      yum install ambari-agent

    2. Using a text editor, configure the Ambari Agent by editing the ambari-agent.ini file as shown in the following example:

      vi /etc/ambari-agent/conf/ambari-agent.ini

      [server] hostname=<your.ambari.server.hostname>

      url_port=8440

      secured_url_port=8441

    3. Start the agent on every host in your cluster.

      ambari-agent start

      The agent registers with the Server on start.

     

     

     //遇到The following hosts have Transparent Huge Pages (THP) enabled. THP should be disabled to avoid potential Hadoop performance issues.错误的解决方法:

     解决办法,在Linux下执行:

    echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
    echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    echo never > /sys/kernel/mm/transparent_hugepage/defrag
  • 相关阅读:
    使企点QQ来消息时不自动弹出窗口(以避免错过旧的消息和避免正在回复A时自动定位到B从而影响客服效率)
    8款开源聊天软件
    博客园设置皮肤(宽屏等)及选择文本编辑器
    Windows Server 2019 设置使用照片查看器查看图片
    使windows10重启后打开上次的文件夹和程序
    TinyMCE 5 富文本编辑器好
    wordpress 安装 Elementor PRO 插件(破解版)
    无法打印,提示“windows 打印后台处理程序 没有运行”的解决方案
    第一次将代码提交至git error: failed to push some refs to 'https://gitee.com/xxx/test.git'
    git本地和远程的关联问题
  • 原文地址:https://www.cnblogs.com/haoliansheng/p/5125870.html
Copyright © 2020-2023  润新知