ubuntu 18.04安装hdp 3.1.0最新完整版(含安装包)

简介: hdp平台提供centos、ubuntu等平台的安装与使用,本文以ubuntu 18.04操作系统为基础,介绍hdp3.1.0在该平台上的安装与配置,并提供安装包下载,手把手教您搭建属于您的大数据平台。

节点准备

hostname ip 角色
ubuntu-1804-1 172.21.73.53 从节点
ubuntu-1804-2 172.21.73.54 主节点
ubuntu-1804-3 172.21.73.55 从节点

关闭防火墙

sudo ufw disable

配置时钟同步NTP

所有节点安装ntp

sudo apt install ntp

以ubuntu-1804-2为server,在ubuntu-1804-2进行如下修改

修改配置文件vim /etc/ntp.conf,将下述配置注释

#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst

#pool ntp.ubuntu.com

进行如下配置,将“restrict default nomodify notrap noquery”这行修改成

restrict default nomodify notrap
restrict 172.21.73.0 mask 255.255.255.0

ubuntu-1804-1和ubuntu-1804-3同样注释下述配置,

#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst

#pool ntp.ubuntu.com

新增

server ubuntu-1804-2 prefer

启动ntp服务

systemctl enable ntp
systemctl start ntp

开启使用root登陆

使用普通用户进入root用户

sudo su

设置root密码

passwd root

修改配置

vim /etc/ssh/sshd_config

新增如下配置:

PermitRootLogin yes

重启ssh

systemctl restart sshd

配置免密登录

ubuntu-1804-2可以免密登陆ubuntu-1804-1、ubuntu-1804-2、ubuntu-1804-3

三台机器均执行如下操作:

root@ubuntu-1804-2:~# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:2MRn3ranRz0AFjMqx1t3Qk5QibTnPrw+zR9MY9ftu6s root@ubuntu-1804-3
The key's randomart image is:
+---[RSA 2048]----+
|          .*=+.  |
|       .. .+B.   |
|       .o++o.= . |
|       +o+o.+.o o|
|      . S.. o..=+|
|           .o.=o+|
|            .=+oo|
|             ++oo|
|            oEo+=|
+----[SHA256]-----+

在ubuntu-1804-2中进入root用户,执行如下命令,提示输入root密码,请输入root密码:

ssh-copy-id ubuntu-1804-1
ssh-copy-id ubuntu-1804-2
ssh-copy-id ubuntu-1804-3

至此,ubuntu-1804-2可以用root用户成功免密登陆ubuntu-1804-1、ubuntu-1804-2、ubuntu-1804-3

mysql安装

sudo apt install mysql-server mysql-client
sudo systemctl enable mysql
sudo systemctl start mysql

默认账号密码在文件/etc/mysql/debian.cnf 中

ubuntu@ubuntu-1804-2:/etc/apt/sources.list.d$ sudo cat /etc/mysql/debian.cnf 
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = 0cBYq68fUGyFCpPw
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = 0cBYq68fUGyFCpPw
socket   = /var/run/mysqld/mysqld.sock

修改root用户密码

use mysql;

update mysql.user set authentication_string=password('Pass-123-root') where user='root' and Host='localhost';

update user set  plugin="mysql_native_password";

flush privileges;

新建ambari用户与用户授权

create user 'ambari'@'*' identified by 'Pass-123-root';

create database ambari;

grant all privileges on ambari.* to 'ambari'@'%' identified by 'Pass-123-root' with grant option;

修改配置文件,允许仓库远程访问:

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

找到下面一行,进行注释:

bind-address = 127.0.0.1

改为

# bind-address = 127.0.0.1

重启mysql

sudo systemctl restart mysql

下载安装包

网盘地址:

链接: https://pan.baidu.com/s/1DSPruiQ5BN2ioXCe_ew9SQ 提取码: 9ama

如果你没有开会员,可以参考这个进行高速下载:https://lrting.top/books/hdp-3-1-centos7-ubuntu18-04-download/

配置deb源

在ubuntu-2上配置deb仓库

sudo apt-get install apache2
sudo chmod -R 777 /var/www/html
sudo systemctl enable apache2
sudo systemctl start apache2

将ambari拷贝到/var/www/html目录下

ubuntu@ubuntu-1804-2:/var/www/html$ ll /var/www/html/ambari
total 12
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec  2 03:27 ./
drwxrwxrwx 3 root   root   4096 Dec  2 03:27 ../
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec  2 03:27 ubuntu18/

在/etc/apt/sources.list.d目录下,新增文件ambari.list,内容为:

deb http://ubuntu-1804-2/ambari/ubuntu18/2.7.3.0-139/ Ambari main

新增文件hdp.list,内容为:

deb http://ubuntu-1804-2/HDP-GPL/ubuntu18/3.1.0.0-78/ HDP-GPL main
deb http://ubuntu-1804-2/HDP-UTILS/ubuntu18/1.1.0.22/ HDP-UTILS main
deb http://ubuntu-1804-2/HDP/ubuntu18/3.1.0.0-78/ HDP main

导入gpg(每台机器都需要执行)

ubuntu@ubuntu-1804-2:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv B9733A7A07513CAD
Executing: /tmp/apt-key-gpghome.BZYA0AHSxL/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv B9733A7A07513CAD
gpg: key B9733A7A07513CAD: public key "Jenkins (HDP Builds) <jenkin@hortonworks.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

更新源

sudo apt update

安装配置ambari-server

sudo apt install ambari-server

配置ambari-server

root@ubuntu-1804-2:~# 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)? 
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/lib/java/jdk8
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)? 
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
Hostname (localhost): 172.21.73.54
Port (3306): 
Database name (ambari): 
Username (ambari): 
Enter Database Password (bigdata): 
Re-enter password: 
Configuring ambari database...
Enter full path to custom jdbc driver: /var/lib/ambari-server/resources/mysql-connector-java-5.1.43.jar
Copying /var/lib/ambari-server/resources/mysql-connector-java-5.1.43.jar to /usr/share/javaConfiguring 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)? y
Extracting system views...
....ambari-admin-2.7.3.0.139.jar

Ambari repo file doesn't contain latest json url, skipping repoinfos modification
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
root@ubuntu-1804-2:~# 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.

启动ambari-server

ambari-server start

页面浏览http://172.21.73.54:8080/

请添加图片描述

集群注册与组件安装

请添加图片描述
请添加图片描述

填入hostname以及私钥,私钥文件为:ubuntu-1804-2的/root/.ssh/id_rsa文件

请添加图片描述

请添加图片描述
先选择Ambari Metrics、zookeeper和hdfs,其他的组件等安装完了再选择
请添加图片描述
请添加图片描述
Datanode和client全部选上
请添加图片描述
设置密码请添加图片描述

请添加图片描述
请添加图片描述
使用默认配置

请添加图片描述

请添加图片描述
请添加图片描述
请添加图片描述

相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。 &nbsp; 相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情:&nbsp;https://www.aliyun.com/product/rds/mysql&nbsp;
相关文章
|
2月前
|
Ubuntu 安全 iOS开发
Nessus Professional 10.10 Auto Installer for Ubuntu 24.04 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for Ubuntu 24.04 - Nessus 自动化安装程序
165 5
|
2月前
|
NoSQL Ubuntu MongoDB
在Ubuntu 22.04上安装MongoDB 6.0的步骤
这些步骤应该可以在Ubuntu 22.04系统上安装MongoDB 6.0。安装过程中,如果遇到任何问题,可以查阅MongoDB的官方文档或者Ubuntu的相关帮助文档,这些资源通常提供了解决特定问题的详细指导。
321 18
|
3月前
|
Ubuntu 安全 关系型数据库
安装MariaDB服务器流程介绍在Ubuntu 22.04系统上
至此, 您已经在 Ubuntu 22.04 系统上成功地完成了 MariadB 的标准部署流程,并且对其进行基础但重要地初步配置加固工作。通过以上简洁明快且实用性强大地操作流程, 您现在拥有一个待定制与使用地强大 SQL 数据库管理系统。
298 18
|
3月前
|
Ubuntu 安全 关系型数据库
安装MariaDB服务器流程介绍在Ubuntu 22.04系统上
至此, 您已经在 Ubuntu 22.04 系统上成功地完成了 MariadB 的标准部署流程,并且对其进行基础但重要地初步配置加固工作。通过以上简洁明快且实用性强大地操作流程, 您现在拥有一个待定制与使用地强大 SQL 数据库管理系统。
309 15
|
3月前
|
存储 Ubuntu iOS开发
在Ubuntu 22.04系统上安装libimobiledevice的步骤
为了获取更多功能或者解决可能出现问题,请参考官方文档或者社区提供支持。
205 14
|
3月前
|
Ubuntu 安全 关系型数据库
安装与配置MySQL 8 on Ubuntu,包括权限授予、数据库备份及远程连接指南
以上步骤提供了在Ubuntu上从头开始设置、配置、授权、备份及恢复一个基础但完整的MySQL环境所需知识点。
452 7
|
3月前
|
消息中间件 人工智能 运维
Ubuntu环境下的 RabbitMQ 安装与配置详细教程
本文聚焦在Ubuntu下RabbitMQ安装与配置教程,旨在帮助读者快速构建稳定可用的消息队列服务。
|
4月前
|
XML Ubuntu Java
如何在Ubuntu系统上安装和配置JMeter和Ant进行性能测试
进入包含 build.xml 的目录并执行:
244 13
|
4月前
|
Ubuntu 关系型数据库 MySQL
Ubuntu 22.04.1上安装MySQL 8.0及设置root密码的注意事项
这些是在Ubuntu 22.04.1 系统上安装MySQL 8.0 及设置root密码过程中必须考虑的关键点。正确的遵循这些步骤可确保MySQL的安装过程既顺利又安全。
880 20
|
4月前
|
Ubuntu Linux
如何在 Ubuntu 服务器上安装桌面环境(GUI)
如果你有任何问题,请在评论区留言。你会在服务器上使用 GUI 吗?参照本文后你遇到了什么问题吗?
598 0