Ambari(HDP)单机部署

Ambari(HDP)单机部署

经验文章nimo972025-01-13 11:00:2512A+A-


首先,修改服务器主机名为 master01.ambari.com


一、环境准备

操作系统: centos 7 x86_64.1804

Ambari版本:2.7.0

HDP版本:3.0.0

HAWQ版本:2.3.0


二、安装必备软件(安装yum priorities plugin)

yum install yum-plugin-priorities –y


三、搭建本地仓库:

1、下载软件包:

mkdir -p /home/downloads;cd /home/downloads

wget 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

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

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

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

wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz

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

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


2、搭建本地仓库(安装并开启Apache HTTP服务)

yum install httpd -y

systemctl enable httpd

systemctl start httpd

mkdir -p /var/www/html


3、创建HDP,HDF子目录

cd /var/www/html/;mkdir hdp hdf


4、解开下载的软件包:

cd /var/www/html

tar -zxvf /root/downloads/ambari-2.7.0.0-centos7.tar.gz -C .

tar -zxvf /root/downloads/HDP-3.0.0.0-centos7-rpm.tar.gz -C ./hdp

tar -zxvf /root/downloads/HDP-GPL-3.0.0.0-centos7-gpl.tar.gz -C ./hdp

tar -zxvf /root/downloads/HDP-UTILS-1.1.0.22-centos7.tar.gz -C ./hdp

5、 修改下载的ambari.repo,

cd /etc/yum.repos.d/;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://
master01.ambari.com/ambari/centos7/2.7.0.0-897
gpgcheck=1
gpgkey=http://
master01.ambari.com/ambari/centos7/2.7.0.0-897/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

6、修改下载的hdp.repo,

cd /etc/yum.repos.d/; vim hdp.repo

#VERSION_NUMBER=3.0.0.0-1634
[HDP-3.0]
name=HDP Version - HDP-3.0.0.0
baseurl=http://
master01.ambari.com/hdp/HDP/centos7/3.0.0.0-1634
gpgcheck=1
gpgkey=http://
master01.ambari.com/hdp/HDP/centos7/3.0.0.0-1634/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

[HDP-3.0-GPL]
name=HDP GPL Version - HDP-GPL-3.0.0.0
baseurl=http://
master01.ambari.com/hdp/HDP-GPL/centos7/3.0.0.0-1634
gpgcheck=1
gpgkey=http://
master01.ambari.com/hdp/HDP-GPL/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://
master01.ambari.com/hdp/HDP-UTILS/centos7/1.1.0.22
gpgcheck=1
gpgkey=http://
master01.ambari.com/hdp/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1


四、主节点安装ambari server

1、使用刚才配置好的本地仓库,直接yum命令安装。

yum install ambari-server -y


五、安装MySQL数据库

1、安装步骤略

2、创建数据库

use mysql;

grant all privileges on *.* to 'ambari'@'%' identified by 'ambari';

grant all privileges on *.* to 'ambari'@'localhost' identified by 'ambari';

flush privileges;


create database ambari;

use ambari;

source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;

create database hive;

grant all privileges on *.* to 'hive'@'%' identified by 'root';

grant all privileges on *.* to 'hive'@'localhost' identified by 'root';


3、把mysql-connector-java.jar包放入/usr/share/java/中


六、配置ambari server

1、执行命令ambari-server setup进行配置

2、执行

ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar


七、启动ambari-server

systemctl enable ambari-server

systemctl start ambari-server


八、所有主机节点,安装ambari-agent,并配置自启动

yum install ambari-agent -y 

systemctl enable ambari-agent 

systemctl restart ambari-agent && systemctl status ambari-agent


九、登录页面进行配置

master01.ambari.com:8080



十、问题处理

1、spark2.3无法读取hive数据

https://blog.csdn.net/u013024563/article/details/81567849


点击这里复制本文地址 以上内容由nimo97整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!
qrcode

尼墨宝库 © All Rights Reserved.  蜀ICP备2024111239号-7