Ambari-2.7.5 + HDP-3.1.5安装包下载方式:
关注微信公众号:浮世Talk,回复ambari即可获取
介绍
Ambari是Apache软件基金会中顶级项目,由Ambari Server和Ambari Agent两部分组成,基于它的分布式架构特点,可以便捷的创建、管理、监控Hadoop整个生态圈(例如Hive、HBase、Kafka、ZooKeeper等)的集群。
集群规划
本次安装使用三台虚拟机,系统版本为7.9,分别是一台master节点,两台node节点。所使用的软件版本为ambari-2.7.5.0-72与HDP-3.1.5.0-152,该安装包可在公众号后台发送ambari自行获取。以下为集群规划:

环境配置
1.关闭防火墙
关闭防火墙步骤在所有节点操作。
查看防火墙的状态:
systemctl status firewalld.service

关闭防火墙:
systemctl stop firewalld.service

设置开机不启动:
systemctl disable firewalld.service

2.设置hostname
设置hostname步骤在所有节点操作。
设置hosts映射:
vi /etc/hosts
192.168.1.10 master.mzy.com192.168.1.11 node1.mzy.com192.168.1.12 node2.mzy.com
永久修改主机名:
vi /etc/sysconfig/network
NETWORKING=yesHOSTNAME=master.mzy.com
3.安装时间同步服务(ntp)
安装时间同步服务步骤在所有节点操作。
安装ntp服务:
yum install -y ntp
启动并查看状态:
systemctl start ntpd.servicesystemctl status ntpd.service
设置开机自启:
systemctl enable ntpd.service

4.关闭Selinux和THP
关闭Selinux和THP步骤在所有节点操作。
查看状态:sestatus

关闭SELINUX:(设置SELINUX=disabled)
vi /etc/sysconfig/selinux
# 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
查看是否启动了THP:
cat /sys/kernel/mm/transparent_hugepage/defrag

以上输出[always]说明启动了透明大页。
永久关闭:
vi /etc/rc.d/rc.local(添加以下内容)
if test -f /sys/kernel/mm/transparent_hugepage/enabled; thenecho never > /sys/kernel/mm/transparent_hugepage/enabledfiif test -f /sys/kernel/mm/transparent_hugepage/defrag; thenecho never > /sys/kernel/mm/transparent_hugepage/defragfi
保存退出,然后赋予rc.local文件执行权限:
chmod +x /etc/rc.d/rc.local
重启:reboot
检查是否关闭大透明页:
cat /sys/kernel/mm/transparent_hugepage/defrag

5.设置最大打开文件数
设置最大打开文件数步骤在所有节点操作。
查看最大打开文件数:
ulimit -a

建议的最大打开文件描述符数为10000或更多。
修改配置文件:
vi /etc/security/limits.conf(添加以下内容)
* soft noproc 65535* hard noproc 65535* soft nofile 65535* hard nofile 65535
重启生效后再次查看最大打开文件数:

6.免密登录
免密登录步骤在master节点操作,该步骤设置master到master、 node1、node2之间的免密登录。
首先生成ssh公钥认证所需的公钥和私钥文件。
在master节点上执行:
ssh-keygen -t rsa(连续按三次回车键)

设置master到 master免密登录:
ssh-copy-id master.mzy.com

设置master到 node1免密登录:
ssh-copy-id node1.mzy.com

设置master到 node2免密登录:
ssh-copy-id node2.mzy.com

安装MYSQL
安装MySQL步骤在master节点操作。

本文详细记录了使用Ambari-2.7.5整合HDP-3.1.5在三台虚拟机上构建Hadoop集群的全过程,包括集群规划、环境配置、安装Ambari和HDP、配置MySQL、设置免密登录等关键步骤,最后进行了简单的测试验证。
1万+

被折叠的 条评论
为什么被折叠?



