Ambari简介&安装

简介

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

Apache Ambari 支持HDFS、MapReduce、Hive、Pig、Hbase、Zookeper、Sqoop和Hcatalog等的集中管理。也是5个顶级hadoop管理工具之一。

就 Ambari 的作用来说,就是创建、管理、监视 Hadoop 的集群,但是这里的 Hadoop 是广义,指的是 Hadoop 整个生态圈(例如 Hive,Hbase,Sqoop,Zookeeper 等),而并不仅是特指 Hadoop。用一句话来说,Ambari 就是为了让 Hadoop 以及相关的大数据软件更容易使用的一个工具。

安装文档:https://docs.cloudera.com/HDPDocuments/Ambari-2.7.0.0/bk_ambari-installation/content/ch_Getting_Ready.html

Ambari文档: https://docs.cloudera.com/HDPDocuments/Ambari/Ambari-2.7.0.0/index.html

安装(使用本地源)

安装ambari server

使用两台虚拟机搭建,一台用作server,一台用作agent

修改主机名称和host文件

hostnamectl set-hostname server.ambari.com

hostnamectl set-hostname agent.ambari.com


# 配置host vim /etc/hosts
192.168.198.88 server server.ambari.com
192.168.198.89 agent agent.ambari.com

关闭防火墙和selinux

  1. 关闭防火墙

    systemctl stop firewalld
    systemctl disable firewalld.service
    
  2. 关闭selinux

    vim /etc/selinux/config
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #     enforcing - SELinux security policy is enforced.
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    SELINUX=disabled
    # SELINUXTYPE= can take one of three values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected.
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted
    
    setenforce 0    # 临时关闭selinux
    getenforce      # 查看selinux状态
    

ssh免密

注:只需要对server做其他节点的单向免密即可,同时需要进行自身免密

# 生成密钥
[root@server ~]# ssh-keygen -t rsa
[root@agent ~]# ssh-keygen -t rsa

# 进行免密登录
[root@server ~]# ssh-copy-id server
[root@server ~]# ssh-copy-id agent

安装JDK和Mysql

安装JDK

  1. 安装JDK

  2. 配置环境变量

    vim .bash_profile
    
    # set java home
    export JAVA_HOME=/home/jdk1.8.0_171
    export JRE_HOME=/home/jdk1.8.0_171/jre
    export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
    export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
    

安装mysql

  1. 创建Mysql本地源

    1. 安装&启动 httpd

      安装完成后会存在 /var/www/html 文件夹

      # 安装httpd
      yum install httpd
      # 启动httpd
      systemctl start httpd
      # 设置开机启动
      systemctl enable httpd
      
      # 创建mysql-repo,用来存放mysql的rpm包
      mkdir mysql-repo
      # 将rpm包解压到该文件夹
      tar -xvf mysql-5.7.23-1.el7.x86_64.rpm-bundle.tar -C /var/www/html/mysql_repo
      

      web页面访问:ip/mysql_repo

    2. 安装createrepo

      # 安装 createrepo
      yum install createrepo
      
      # 创建本地源
      createrepo /var/www/html/mysql_repo
      
      # 创建文件 *.repo 一定要以repo为文件后缀名
      touch /etc/yum.repos.d/mysql-local.repo
      vim /etc/yum.repos.d/mysql-local.repo
      
      # the RPMs of MySQL server
      [mysql-local]
      name=mysql-local
      baseurl=http://192.168.24.88/mysql_repo
      gpgcheck=0
      enabled=1
      
      # 清空本地的yum源缓存
      yum clean all
      # 重新生成元数据
      yum makecache
      
      # 使用yum查看本地源文件
      yum list | grep mysql-local
      
  2. 安装mysql

    # 安装mysql
    yum install -y mysql-community-server
    
    # 初始化mysql
    mysqld --initialize --user=mysql --console
    
    # 启动mysql
    systemctl start mysqld
    # 开机自启
    systemctl enable mysqld
    
    # 修改字符集 
    vim /etc/my.cnf
    
    # For advice on how to change settings please see
    # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
    
    # >>> 追加内容开始
    [client]
    port
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值