Ambari2.7.3 和HDP3.1.0搭建Hadoop集群
一、环境及软件准备
1、集群规划
hdp01/10.1.1.11 | hdp02/10.1.1.12 | hdp03/10.1.1.13 | hdp04/10.1.1.14 | hdp05/10.1.1.15 | |
---|---|---|---|---|---|
ambari server | 是 | 否 | 否 | 否 | 否 |
ambari agent | 是 | 是 | 是 | 是 | 是 |
namenode | 是 | 是 | 否 | 否 | 否 |
datanode | 否 | 否 | 是 | 是 | 是 |
resourcemanager | 是 | 是 | 否 | 否 | 否 |
journalnode | 是 | 是 | 是 | 是 | 是 |
zookeeper | 是 | 是 | 是 | 否 | 否 |
01和02主要做管理机,03-05做数据数据节点,01-03做zookeeper集群。
主机环境为Ubuntu server18.04,主机间已经建立互信。
2、下载ambari安装包
https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.3.0/bk_ambari-installation/content/ambari_repositories.html
找到对应的版本下载即可。
ps需要下载repo file,ambari.list
3、下载hdp安装包
ps需要下载repo file,hdp.gpl.list,hdp.list.
4、安装一台lnmp备用
选择hadoop01
wget -c http://soft.vpser.net/lnmp/lnmp1.5.tar.gz && tar zxf lnmp1.5.tar.gz && cd lnmp1.5 && ./install.sh lnmp
选择安装mysql5.7版本用于支持ambari
开启远程访问mysql。
mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' ;
flush privileges;
5、复制下载文件
放到lnmp的默认目录下。
mkdir /home/wwwroot/default/ambari
mkdir /home/wwwroot/default/ambari/HDP-UTILS
cd /home/wwwroot/default/ambari
复制下载文件到相关目录并解压。
tar -zxvf ambari-2.7.3.0-ubuntu18.tar.gz
tar -zxvf HDP-GPL-3.1.0.0-ubuntu18-gpl.tar.gz
tar -zxvf HDP-3.1.0.0-ubuntu18-deb.tar.gz
tar -zxvf HDP-UTILS-1.1.0.22-ubuntu18.tar.gz -C HDP-UTILS
开启nginx目录浏览
nginx.conf http { }加入
autoindex on; #开启nginx目录浏览功能
autoindex_exact_size off; #文件大小从KB开始显示
autoindex_localtime on;
6、配置本地源
cd /etc/apt/sources.list.d
ambari.list
#VERSION_NUMBER=2.7.3.0-139
#json.url = http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json
deb http://192.168.0.151/ambari/ambari/ubuntu18/2.7.3.0-139/ Ambari main
hdp.list
#VERSION_NUMBER=3.1.0.0-78
deb http://192.168.0.151/ambari/HDP/ubuntu18/3.1.0.0-78/ HDP main
deb http://192.168.0.151/ambari/HDP-UTILS/HDP-UTILS/ubuntu18/1.1.0.22/ HDP-UTILS main
hdp.gpl.list
#VERSION_NUMBER=3.1.0.0-78
deb http://192.168.0.151/ambari/HDP-GPL/ubuntu18/3.1.0.0-78/ HDP-GPL main
更新list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
sudo apt-get update
apt-cache showpkg ambari-server
apt-cache showpkg ambari-agent
apt-cache showpkg ambari-metrics-assembly
复制到各台主机,并在各台主机更新list。
scp /etc/apt/sources.list.d/ambari.list 192.168.0.152:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/ambari.list 192.168.0.153:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/ambari.list 192.168.0.154:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/ambari.list 192.168.0.155:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.list 192.168.0.152:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.list 192.168.0.153:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.list 192.168.0.154:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.list 192.168.0.155:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.gpl.list 192.168.0.152:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.gpl.list 192.168.0.153:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.gpl.list 192.168.0.154:/etc/apt/sources.list.d/
scp /etc/apt/sources.list.d/hdp.gpl.list 192.168.0.155:/etc/apt/sources.list.d/
二、安装hdp集群
1、安装ambari &hadoop01
sudo apt-get install ambari-server
Success. You can now start the database server using:
/usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: using /usr/share/postgresql/10/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Setting up postgresql (10+190) ...
Setting up ambari-server (2.7.3.0-139) ...
Processing triggers for systemd (237-3ubuntu10.9) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
2、配置ambari
root@hadoop01:/home/wwwroot/default/ambari# sudo ambari-server setup
Using python /usr/bin/python
Setup ambari-server
Checking SELinux...
WARNING: Could not run /usr/sbin/sestatus: OK
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):
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):
配置java路径即可
/usr/lib/jvm/java-8-openjdk-amd64
配置mysql
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)?
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): 3
配置jdbc,需要上传jdbc.bin.jar
路径如下。
/var/lib/ambari-server/resources/mysql-connector-java-5.1.47-bin.jar
Configuring ambari database...
Enter full path to custom jdbc driver:
Configuring ambari database...
Enter full path to custom jdbc driver: /var/lib/ambari-server/resources/mysql-connector-java-5.1.47-bin.jar
Copying /var/lib/ambari-server/resources/mysql-connector-java-5.1.47-bin.jar to /usr/share/java
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL directly from the database shell to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)?
Extracting system views...
....ambari-admin-2.7.3.0.139.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.
三、配置ambari
1、导入mysql库
mysql -u root -p
mysql> create database ambari;
mysql> use ambari;
mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;
2、启动ambari
root@hadoop01:/home/wwwroot/default/ambari#
sudo 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: no errors and warnings were found.
Ambari Server 'start' completed successfully.
四、安装hadoop集群
http://192.168.0.151:8080
用户名密码、admin/admin
选择本地库。
输入目录。
http://192.168.0.151/ambari/HDP/ubuntu18/3.1.0.0-78
http://192.168.0.151/ambari/HDP-UTILS/HDP-UTILS/ubuntu18/1.1.0.22/
cat ~/.ssh/id_rsa
获取ssh密钥。
其他主机出现错误,跟agent没安装上有关。
在其他主机执行
apt install ambari-agent -y
Ranger、Ranger KMS选了安装失败。取消可以成功。
Ambari2.7.3 和HDP3.1.0搭建Hadoop集群的更多相关文章
- 使用Windows Azure的VM安装和配置CDH搭建Hadoop集群
本文主要内容是使用Windows Azure的VIRTUAL MACHINES和NETWORKS服务安装CDH (Cloudera Distribution Including Apache Hado ...
- virtualbox 虚拟3台虚拟机搭建hadoop集群
用了这么久的hadoop,只会使用streaming接口跑任务,各种调优还不熟练,自定义inputformat , outputformat, partitioner 还不会写,于是干脆从头开始,自己 ...
- 搭建Hadoop集群 (三)
通过 搭建Hadoop集群 (二), 我们已经可以顺利运行自带的wordcount程序. 下面学习如何创建自己的Java应用, 放到Hadoop集群上运行, 并且可以通过debug来调试. 有多少种D ...
- 搭建Hadoop集群 (一)
上面讲了如何搭建Hadoop的Standalone和Pseudo-Distributed Mode(搭建单节点Hadoop应用环境), 现在我们来搭建一个Fully-Distributed Mode的 ...
- 搭建Hadoop集群 (二)
前面的步骤请看 搭建Hadoop集群 (一) 安装Hadoop 解压安装 登录master, 下载解压hadoop 2.6.2压缩包到/home/hm/文件夹. (也可以从主机拖拽或者psftp压缩 ...
- Hadoop入门进阶步步高(五)-搭建Hadoop集群
五.搭建Hadoop集群 上面的步骤,确认了单机能够运行Hadoop的伪分布运行,真正的分布式运行无非也就是多几台slave机器而已,配置方面的有一点点差别,配置起来就很easy了. 1.准备三台se ...
- Linux 搭建Hadoop集群 成功
内容基于(自己的真是操作步骤编写) Linux 搭建Hadoop集群---Jdk配置 Linux 搭建Hadoop集群 ---SSH免密登陆 一:下载安装 Hadoop 1.1:下载指定的Hadoop ...
- 阿里云搭建hadoop集群服务器,内网、外网访问问题(详解。。。)
这个问题花费了我将近两天的时间,经过多次试错和尝试,现在想分享给大家来解决此问题避免大家入坑,以前都是在局域网上搭建的hadoop集群,并且是局域网访问的,没遇见此问题. 因为阿里云上搭建的hadoo ...
- 虚拟机搭建Hadoop集群
安装包准备 操作系统:ubuntu-16.04.3-desktop-amd64.iso 软件包:VirtualBox 安装包:hadoop-3.0.0.tar.gz,jdk-8u161-linux-x ...
随机推荐
- php 图片缩放然后合成并保存
/** * 功能说明 * 将files/model_24/images/下的所有图片文件进行等比例缩放 到$image40w 尺寸 然后放到files/model_24/model.png图片的指定位 ...
- UltraISO 9.7.1.3519注册码
王涛 7C81-1689-4046-626F redcaps 82C6-3DEF-AB07-0EC0
- CRM项目之stark组件
. stark也是一个app(用startapp stark创建),目标时把这个做成一个可以拔插的组件 . setting文件下INSTALLED_APPS 路径要配置好(app的注册) . 写好si ...
- SysUtils.CompareText的注释
两个字符串对象进行比较,忽略大小写,两个字符串缓冲区地址利用EAX和EDX两个寄存器传给该函数,字符串的长度用4个字节保存在缓冲区的前面,函数用EAX返回比较结果,结果为0表示相同. function ...
- centos 使用RPM包安装指定版本的docker-engine
下面是拿安装docker-engine-1.10.3-1为例: wget https://yum.dockerproject.org/repo/main/centos/7/Packages/docke ...
- Azure VMSS (2) 对VM执行Generalize操作
<Windows Azure Platform 系列文章目录> 在本章中,笔者将介绍如何创建Azure Template镜像模板. 1.首先,我们先创建1台Windows Server 2 ...
- [转]检测到有潜在危险的 Request.Form 值
<system.web> <httpRuntime targetFramework="4.0" requestValidationMode="2.0&q ...
- Vue--生命周期函数
生命周期函数就是组件挂载.以及组件销毁的时候触发的一系列方法,这些方法叫做生命周期函数: beforeCreate(){ console.log('实例创建之前-1') }, created(){ c ...
- React开发笔记
项目环境搭建 使用create-react-app CSS使用styled-components yarn add styled-components 引入reset.css样式 import { c ...
- 清除UIWebView缓存
//清除cookies NSHTTPCookie *cookie; NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCook ...