1.安装环境说明

安装前先安装好 Centos 7.2, jdk-8u91, mysql5.7.13

一共有3台机器,一个是主节点192.168.111.10,两个是从:192.168.111.11,192.168.111.12

2.操作系统环境准备

2.1 配置SSH免密码登录

主节点里root用户登录执行如下步骤

ssh-keygen
cd ~/.ssh/
cat id_rsa.pub >>authorized_keys
chmod ~/.ssh
chmod ~/.ssh/authorized_keys

先在从节点登录root执行命令

mkdir ~/.ssh/

分发主节点里配置好的authorized_keys到各从节点

scp /root/.ssh/authorized_keys root@192.168.111.11:/root/.ssh/authorized_keys
scp /root/.ssh/authorized_keys root@192.168.111.12:/root/.ssh/authorized_keys

2.2 创建ambari系统用户和用户组

只在主节点操作

添加ambari安装、运行用户和用户组,也可以不创建新用户,直接使用root或者系统其他账号

adduser ambari
passwd ambari

2.3 开启NTP服务

所有集群上节点都需要操作

Centos 7 命令

yum  install ntp
systemctl is-enabled ntpd
systemctl enable ntpd
systemctl start ntpd

Centos 6 命令

yum install ntpd
chkconfig --list ntpd
chkconfig ntpd
service ntpd start

2.4 检查DNS和NSCD

所有节点都要设置

ambari在安装时需要配置全域名,所以需要检查DNS。为了减轻DNS的负担, 建议在节点里用 Name Service Caching Daemon (NSCD)

vi /etc/hosts
192.168.111.10 bjlhx1510 bjlhx1510.hadoop
192.168.111.11 bjlhx1511 bjlhx1511.hadoop
192.168.111.12 bjlhx1512 bjlhx1512.hadoop

每台节点里配置FQDN,如下以主节点为例

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=bjlhx1510.hadoop

2.5 关闭防火墙

所有节点都要设置

Centos 7 命令

systemctl disable firewalld
systemctl stop firewalld

Centos 6 命令

chkconfig iptables off
/etc/init.d/iptables stop

2.6 关闭SELinux

所有节点都要设置

查看SELinux状态:

sestatus

如果SELinux status参数为enabled即为开启状态 
SELinux status: enabled

临时关闭,不用重启机器:

setenforce 

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

vi /etc/sysconfig/selinux
SELINUX=disabled

3.制作本地源

制作本地源只需在主节点上进行即可

3.1 相关准备工作

3.1.1安装 Apache HTTP 服务器

安装HTTP 服务器,允许 http 服务通过防火墙(永久)

yum install httpd
firewall-cmd --add-service=http
firewall-cmd --permanent --add-service=http

添加 Apache 服务到系统层使其随系统自动启动

systemctl start httpd.service
systemctl enable httpd.service
3.1.2 安装本地源制作相关工具
yum install yum-utils createrepo

3.2 下载安装资源

下载 Ambari 2.2.2 , HDP 2.4.2 的安装资源,本次安装是在Centos 7 上,只列出centos7的资源,其他系统的请现在对用系统的资源

Ambari 2.2.2 下载资源

OS Format URL
CentOS 7 Base URL http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0
CentOS 7 Repo File http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo
CentOS 7 Tarball md5 asc http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos7.tar.gz

HDP 2.4.2 下载资源

OS Repository Name Format URL
CentOS 7 HDP Base URL http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0
CentOS 7 HDP Repo File http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/hdp.repo
CentOS 7 HDP Tarball md5 asc http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/HDP-2.4.2.0-centos7-rpm.tar.gz
CentOS 7 HDP-UTILS Base URL http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7
CentOS 7 HDP-UTILS Repo File http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7/HDP-UTILS-1.1.0.20-centos7.tar.gz

下载上面列表的中的压缩包, 
需要下载的压缩包如下:

#Ambari 2.2.
axel http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos7.tar.gz
#HDP 2.4.
axel http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.0.0/HDP-2.4.0.0-centos7-rpm.tar.gz
#HDP-UTILS 1.1.
axel http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7/HDP-UTILS-1.1.0.20-centos7.tar.gz

在httpd网站根目录,默认是即/var/www/html/,创建目录ambari,

并且将下载的压缩包解压到/var/www/html/ambari目录

cd /var/www/html/
mkdir ambari
cd /var/www/html/ambari/
tar -zxvf ambari-2.2.2.0-centos7.tar.gz
tar -zxvf HDP-2.4.2.0-centos7-rpm.tar.gz
tar -zxvf HDP-UTILS-1.1.0.20-centos7.tar.gz

验证httd网站是否可用,可以使用links 命令或者浏览器直接访问下面的地址:

links http://172.31.83.171/ambari/

结果如下

3.3 配置ambari、HDP、HDP-UTILS的本地源

首先下载上面资源列表中的相应repo文件,

axel http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo
axel http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/hdp.repo

修改其中的URL为本地的地址,相关配置如下:

008-Centos 7.x安装 Ambari 2.2.2 + HDP 2.4.2 搭建Hadoop集群的更多相关文章

  1. 使用Windows Azure的VM安装和配置CDH搭建Hadoop集群

    本文主要内容是使用Windows Azure的VIRTUAL MACHINES和NETWORKS服务安装CDH (Cloudera Distribution Including Apache Hado ...

  2. centos 6.9 x86 安装搭建hadoop集群环境

    又来折腾hadoop了 文件准备: centos 6.9 x86 minimal版本 163的源 下软件的时候可能会用到 jdk-8u144-linux-i586.tar.gz ftp工具 putty ...

  3. hadoop集群监控工具ambari安装

    Apache Ambari是对Hadoop进行监控.管理和生命周期管理的基于网页的开源项目.它也是一个为Hortonworks数据平台选择管理组建的项目.Ambari支持管理的服务有: Apache ...

  4. 大数据系列(2)——Hadoop集群坏境CentOS安装

    前言 前面我们主要分析了搭建Hadoop集群所需要准备的内容和一些提前规划好的项,本篇我们主要来分析如何安装CentOS操作系统,以及一些基础的设置,闲言少叙,我们进入本篇的正题. 技术准备 VMwa ...

  5. 大数据——Hadoop集群坏境CentOS安装

    前言 前面我们主要分析了搭建Hadoop集群所需要准备的内容和一些提前规划好的项,本篇我们主要来分析如何安装CentOS操作系统,以及一些基础的设置,闲言少叙,我们进入本篇的正题. 技术准备 VMwa ...

  6. 使用Ambari部署hadoop集群

    准备工作 1. 设置sudo免密码登陆 由于CentOS安装之后,普通用户无sudo权限,故应该设置sudo权限. 参考文章:http://www.cnblogs.com/maybob/p/32988 ...

  7. CentOS7 安装Hadoop集群环境

    先按照上一篇安装与配置好CentOS以及zookeeper http://www.cnblogs.com/dopeter/p/4609276.html 本章介绍在CentOS搭建Hadoop集群环境 ...

  8. docker安装hadoop集群

    docker安装hadoop集群?图啥呢?不图啥,就是图好玩.本篇博客主要是来教大家如何搭建一个docker的hadoop集群.不要问 为什么我要做这么无聊的事情,答案你也许知道,因为没有女票.... ...

  9. hadoop集群安装规划

    http://mp.weixin.qq.com/s?__biz=MzI5MDYxNjIzOQ==&mid=2247483999&idx=1&sn=016e4c4d0ba7bd9 ...

随机推荐

  1. [Stats385] Lecture 04: Convnets from Probabilistic Perspective

    本篇围绕“深度渲染混合模型”展开. Lecture slices Lecture video Reading list A Probabilistic Framework for Deep Learn ...

  2. [IR] Open Source Search Engines

    From:http://blog.csdn.net/xum2008/article/details/8740063 本文档是对现有的开源的搜索引擎的一个简单介绍 1.    Lucene Lucene ...

  3. [R]统计工具包

    Wilcoxon Rank Sum and Signed Rank Tests data <-read.csv('XX.csv') wilcox.test(data$value1, data$v ...

  4. js for in 获得遍历数组索引和对象属性

    for in 遍历对象属性 获取的是对象的属性名 var person ={ name:"admin", age:"21", address:"sha ...

  5. hosts文件配置不生效的解决办法

    分析可能的原因并给出相应的解决方案. 第一 种情况,在开启浏览器的时候修改磁盘上的hosts文件,比如说加了原先没有的一句"127.0.0.1 www.360.cn",保存host ...

  6. customer.java

    package banking; public class Customer { private String firstName; private String lastName; private ...

  7. Mac下利用Cordova打包 iOS App以及出现的问题

    安装 cordova sudo npm install cordova 创建项目 创建一个demo文件夹,里面自动加载基本的文件以及目录 cordova create demo com.test.de ...

  8. F - Communication System

    We have received an order from Pizoor Communications Inc. for a special communication system. The sy ...

  9. juqery 判断所有input 不能为空 判断只能为数字 判断身份证号:18位和15位 判断是否银行卡号

    //jq 判断某字符串是否含有特殊符号 function CheckNum() { //定义数组保存特殊字符 var AllNumIsSame = new Array("’", & ...

  10. TensorRT 进行推理