一、ambari及HDP安装文件下载地址:

1、系统

操作系统:CentOS7

2、软件

本次安装采用最新版本:

ambari-2.7.0.0

hdp-3.0.0.0

详细信息及下载地址如下:

Ambari 2.7.0 Repositories

Base URL :http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0

Repo File :http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/ambari.repo

Tarball md5 | asc :http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/ambari-2.7.0.0-centos7.tar.gz

HDP 3.0 Repositories

Base URL :http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0

Repo File :http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/hdp.repo

Tarball md5 | asc :http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/HDP-3.0.0.0-centos7-rpm.tar.gz

HDP-UTILS Base URL :http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7

Tarball md5 | asc :http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz

HDP-GPL URL :http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.0.0.0/hdp.gpl.repo

Tarball md5 | asc :http://public-repo-1.hortonworks.com/HDP-GPL/centos7/3.x/updates/3.0.0.0/HDP-GPL-3.0.0.0-centos7-gpl.tar.gz

二、配置服务器

1、安装必要依赖:

yum -y install net-tools vim ntp bzip2 gcc readline-devel zlib-devel httpd wget

2、所有服务器分别配置/etc/hosts文件:向其中添加以下3行

192.168.0.105 chavin.king chavin

192.168.0.107 chavin02.king chavin02

192.168.0.108 chavin03.king chavin03

192.168.0.109 chavin01.king chavin01

3、所有服务器均创建安装用户: ambari

groupadd ambari

useradd -g ambari ambari

echo "ambari" | passwd --stdin ambari

4、所有服务器为cloudera用户配置sudo权限

chmod u+w /etc/sudoers

echo "ambari ALL=(root)NOPASSWD:ALL" >> /etc/sudoers

chmod u-w /etc/sudoers

5、所有服务器关闭防火墙、禁用selinux

sed -i '/SELINUX=enforcing/d' /etc/selinux/config

sed -i '/SELINUX=disabled/d' /etc/selinux/config

echo "SELINUX=disabled" >> /etc/selinux/config

systemctl stop firewalld

systemctl disable firewalld

6、所有服务器设置文件打开数量及最大进程数

cp /etc/security/limits.conf /etc/security/limits.conf.bak

echo "* soft nproc 32000" >>/etc/security/limits.conf

echo "* hard nproc 32000" >>/etc/security/limits.conf

echo "* soft nofile 65535" >>/etc/security/limits.conf

echo "* hard nofile 65535" >>/etc/security/limits.conf

7、配置SSH无秘钥登录:至少在namenode和resourcemanager节点配置

ssh-keygen -t rsa

ssh-copy-id chavin.king

ssh-copy-id chavin01.king

ssh-copy-id chavin02.king

ssh-copy-id chavin03.king

8、配置集群时间同步服务:通过ntp服务配置

ntp主节点配置:

cp /etc/ntp.conf /etc/ntp.conf.bak

cp /etc/sysconfig/ntpd /etc/sysconfig/ntpd.bak

echo "restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap" >> /etc/ntp.conf

echo "SYNC_HWCLOCK=yes" >> /etc/sysconfig/ntpd

systemctl restart ntpd

ntp客户端配置:

#crontab -e

输入如下一行内容,保存退出:

0-59/1 * * * * /opt/scripts/sync_time.sh

上述脚本内容如下:

# cat /opt/scripts/sync_time.sh

/sbin/service ntpd stop

/usr/sbin/ntpdate chavin

/sbin/service ntpd start

9、所有节点安装java软件并配置环境变量

export JAVA_HOME=/usr/java/jdk1.8.0_181

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH

10、安装postgresql数据库

参考文档:https://www.cnblogs.com/wcwen1990/p/6655438.html

官网下载:postgresql-9.5.5.tar.bz2

安装:

tar -jxvf postgresql-9.5.5.tar.bz2

cd postgresql-9.5.5

./configure --prefix=/pg955

make world

make install-world

userdel postgres

groupadd postgres

useradd -g postgres postgres

chown -R postgres:postgres /pg955/

su - postgres

配置环境变量:

vim .bash_profile

export PGHOME=/pg955

export PGDATA=/pg955/data

export LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH

PATH=$PGHOME/bin:$PATH

初始化数据库:

pg_ctl init

修改配置文件:

vim postgresql.conf

listen_addresses = '*'

修改访问控制文件:

vim pg_hba.conf

host all all 192.168.0.0/24 md5

启动数据库:

pg_ctl start -l $PGHOME/logfile 2>&1 >/dev/null

修改postgres数据库密码:

psql

postgres=# \password

创建ambari数据库:

create user ambari with password 'ambari';

create database ambari owner=ambari encoding 'utf8' template template0;

grant all privileges on database ambari to ambari;

create schema ambari;

11、安装apache服务器:

service httpd start

cd /var/www/htmp

mkdir ambari

mkdir hdp

三、安装ambari

1、上传文件并解压相应文件:

上传ambari和hdp安装文件到主服务器上,解压ambari文件到/var/www/htmp/ambari/目录下,解压hdp和hdp-untils文件到/var/www/htmp/hdp/目录下。

tar -zxvf ambari-2.7.0.0-centos7.tar.gz -C /var/www/html/ambari/

tar -zxvf HDP-3.0.0.0-centos7-rpm.tar.gz -C /var/www/html/hdp/

tar -zxvf HDP-UTILS-1.1.0.22-centos7.tar.gz -C /var/www/html/hdp/

2、配置yum源文件

wget http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/ambari.repo .

vim ambari.repo

#VERSION_NUMBER=2.7.0.0-897

[ambari-2.7.0.0]

#json.url = http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json

name=ambari Version - ambari-2.7.0.0

baseurl=http://chavin.king/ambari/ambari/centos7/2.7.0.0-897

gpgcheck=1

gpgkey=http://chavin.king/ambari/ambari/centos7/2.7.0.0-897/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins

enabled=1

priority=1

wget http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/hdp.repo .

vim hdp.repo

#VERSION_NUMBER=3.0.0.0-1634

[HDP-3.0.0.0]

name=HDP Version - HDP-3.0.0.0

baseurl=http://chavin.king/hdp/HDP/centos7/3.0.0.0-1634

gpgcheck=1

gpgkey=http://chavin.king/hdp/HDP/centos7/3.0.0.0-1634/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins

enabled=1

priority=1

[HDP-UTILS-1.1.0.22]

name=HDP-UTILS Version - HDP-UTILS-1.1.0.22

baseurl=http://chavin.king/hdp/HDP-UTILS/centos7/1.1.0.22

gpgcheck=1

gpgkey=http://chavin.king/hdp/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins

enabled=1

priority=1

3、安装ambari-server

yum -y install ambari-server

4、配置ambari-server

[root@chavin ~]# ambari-server setup

Using python /usr/bin/python

Setup ambari-server

Checking SELinux...

SELinux status is 'disabled'

Customize user account for ambari-server daemon [y/n] (n)? y

Enter user account for ambari-server daemon (root):ambari

Adjusting ambari-server permissions and ownership...

Checking firewall status...

Checking JDK...

[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8

[2] Custom JDK

====================================================================

Enter choice (1): 2

WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.

WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.

Path to JAVA_HOME: /usr/java/jdk1.8.0_181

Validating JDK on Ambari Server...done.

Check JDK version for Ambari Server...

JDK version found: 8

Minimum JDK version is 8 for Ambari. Skipping to setup different JDK for Ambari Server.

Checking GPL software agreement...

GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html

Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? y

Completing setup...

Configuring database...

Enter advanced database configuration [y/n] (n)? y

Configuring database...

====================================================================

Choose one of the following options:

[1] - PostgreSQL (Embedded)

[2] - Oracle

[3] - MySQL / MariaDB

[4] - PostgreSQL

[5] - Microsoft SQL Server (Tech Preview)

[6] - SQL Anywhere

[7] - BDB

====================================================================

Enter choice (1): 4

Hostname (localhost): chavin.king

Port (5432):

Database name (ambari):

Postgres schema (ambari):

Username (ambari):

Enter Database Password (bigdata):

Re-enter password:

Configuring ambari database...

Configuring remote database connection properties...

WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql

Proceed with configuring remote database connection properties [y/n] (y)?

Extracting system views...

ambari-admin-2.7.0.0.897.jar

....

Ambari repo file contains latest json url http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json, updating stacks repoinfos with it...

Adjusting ambari-server permissions and ownership...

Ambari Server 'setup' completed successfully.

5、执行数据库脚本

psql --host=chavin.king --port=5432 --username=ambari -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql

6、启动ambari-server

[root@chavin ~]# ambari-server start

Using python /usr/bin/python

Starting ambari-server

Ambari Server running with administrator privileges.

Organizing resource files at /var/lib/ambari-server/resources...

Ambari database consistency check started...

Server PID at: /var/run/ambari-server/ambari-server.pid

Server out at: /var/log/ambari-server/ambari-server.out

Server log at: /var/log/ambari-server/ambari-server.log

Waiting for server start.........................................

Server started listening on 8080

DB configs consistency check found warnings. See /var/log/ambari-server/ambari-server-check-database.log for more details.

Ambari Server 'start' completed successfully.

通过 http://chavin.king:8080 地址登陆,可以看到如下登陆界面,初始用户名和密码都是admin。


四、创建HDP集群

1、登陆界面,空空如也:

2、输入集群名称chavin_cluster,然后点击next:

3、配置本地yum源:

4、指定集群机器,输入id_rsa密钥:

5、等待

等待

这里使用了ntp进行时间同步,忽略。

6、下一步:

7、根据规划配置

8、根据规划配置

9、为各个账号设置密码

10、配置数据,首先要配置postgresql驱动:ambari-server setup --jdbc-db=postgres --jdbc-driver=/mnt/postgresql-42.2.5.jar,然后根据数据库连接地址配置,也可以选择mysql数据库

11、根据规划配置:

12、根据规划配置:

13、规矩规划配置:

14、安装概要

15、等待安装完成,时间较长:

16、安装完成,因资源不足,某些组建出现警告,忽略。

17、至此,HDP安装完成。

基于hortonworks的大数据集群环境部署流水的更多相关文章

  1. 基于Docker搭建大数据集群(一)Docker环境部署

    本篇文章是基于Docker搭建大数据集群系列的开篇之作 主要内容 docker搭建 docker部署CentOS 容器免密钥通信 容器保存成镜像 docker镜像发布 环境 Linux 7.6 一.D ...

  2. 基于Docker搭建大数据集群(七)Hbase部署

    基于Docker搭建大数据集群(七)Hbase搭建 一.安装包准备 Hbase官网下载 微云下载 | 在 tar 目录下 二.版本兼容 三.角色分配 节点 Master Regionserver cl ...

  3. 基于Docker搭建大数据集群(六)Hive搭建

    基于Docker搭建大数据集群(六)Hive搭建 前言 之前搭建的都是1.x版本,这次搭建的是hive3.1.2版本的..还是有一点细节不一样的 Hive现在解析引擎可以选择spark,我是用spar ...

  4. 全网最详细的大数据集群环境下多个不同版本的Cloudera Hue之间的界面对比(图文详解)

    不多说,直接上干货! 为什么要写这么一篇博文呢? 是因为啊,对于Hue不同版本之间,其实,差异还是相对来说有点大的,具体,大家在使用的时候亲身体会就知道了,比如一些提示和界面. 安装Hue后的一些功能 ...

  5. 全网最详细的大数据集群环境下如何正确安装并配置多个不同版本的Cloudera Hue(图文详解)

    不多说,直接上干货! 为什么要写这么一篇博文呢? 是因为啊,对于Hue不同版本之间,其实,差异还是相对来说有点大的,具体,大家在使用的时候亲身体会就知道了,比如一些提示和界面. 全网最详细的大数据集群 ...

  6. 大数据集群环境 zookeeper集群环境安装

    大数据集群环境 zookeeper集群环境准备 zookeeper集群安装脚本,如果安装需要保持zookeeper保持相同目录,并且有可执行权限,需要准备如下 编写脚本: vi zkInstall.s ...

  7. 【Hadoop离线基础总结】大数据集群环境准备

    大数据集群环境准备 三台虚拟机关闭防火墙 centOS 7 service firewalld stop ->关闭防火墙 chkconfig firewalld off ->开机关闭防火墙 ...

  8. centos7 ambari2.6.1.5+hdp2.6.4.0 大数据集群安装部署

    前言 本文是讲如何在centos7(64位) 安装ambari+hdp,如果在装有原生hadoop等集群的机器上安装,需要先将集群服务停掉,然后将不需要的环境变量注释掉即可,如果不注释掉,后面虽然可以 ...

  9. 基于Docker搭建大数据集群(五)Mlsql部署

    主要内容 mlsql部署 前提 zookeeper正常使用 spark正常使用 hadoop正常使用 安装包 微云下载 | tar包目录下 mlsql-cluster-2.4_2.11-1.4.0.t ...

随机推荐

  1. JVM--02

    Java虚拟机内存管理: 共享: 方法区:存储运行时常量池.已被虚拟机加载的类信息.常量.静态变量.即时编译器编译后的代码等数据 java堆:存储对象实例 线程独占区: 虚拟机栈:存放方法运行时所需的 ...

  2. linux网关下drcom web自动登陆脚本

    /etc/init.d/drcomd: #!/bin/sh # # The environment is cleared before executing this script # so the p ...

  3. rsyslog磁盘辅助(Disk-Assisted)模式踩坑记

    最近公司为方便tracing.排查, 搞全链路日志收集,而我手上的10亿+pv的动态前端服务必然在考虑之列. 之前呢. 都是运维定制的收集方式: 如上图,rsyslog push kafka, 优点嘛 ...

  4. C语言学习及应用笔记之六:C语言extern关键字及其使用

    在C语言中,修饰符extern用在变量或者函数的声明前,用来以标识变量或者函数的定义在别的文件中,提示编译器遇到此变量或者函数时,在其它文件中寻找其定义.extern关键字的用法有几种,我们下面对其进 ...

  5. background-image属性

    background-image 属性 实例,设置body元素的背景图像: body { background-image: url('paper.gif'); background-color: # ...

  6. freemarker是什么东西?

    前言 由于考虑到网站访问量,以及tocmat可能承受的最大访问压力,我们需要引进一些比较好的技术,来解决这个问题.所以在项目快要结束之际又收到消息,我们要考虑到这些问题然后对现在的项目进行改进,于是就 ...

  7. Java线程池ExecutorService 代码备忘

    ExecutorService fixedThreadPool = Executors.newFixedThreadPool(5)创建一个定长线程池,可控制线程最大并发数,超出的线程会在队列中等待 p ...

  8. using 关键字的作用

    我们都知道可以使用using关键字引入命名空间,例如:using namespace std; using还有个作用是在子类中引入父类成员函数. 1) 当子类没有定义和父类同名的函数(virtual也 ...

  9. iOS开发常用第三库

    字典转模型 1.(MJExtension) https://github.com/CoderMJLee/MJExtension 2.(YYModel) https://github.com/ibire ...

  10. sklearn交叉验证-【老鱼学sklearn】

    交叉验证(Cross validation),有时亦称循环估计, 是一种统计学上将数据样本切割成较小子集的实用方法.于是可以先在一个子集上做分析, 而其它子集则用来做后续对此分析的确认及验证. 一开始 ...