文章目录
简介
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
-
关闭防火墙
systemctl stop firewalld systemctl disable firewalld.service
-
关闭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
-
安装JDK
-
配置环境变量
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
-
创建Mysql本地源
-
安装&启动 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
-
安装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
-
-
安装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