溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

大數(shù)據(jù)平臺HDP搭建

發(fā)布時間:2020-06-12 06:28:35 來源:網(wǎng)絡 閱讀:9042 作者:KaliArch 欄目:大數(shù)據(jù)

一、概述

Apache Ambari是一個基于Web的支持Apache Hadoop集群的供應、管理和監(jiān)控的開源工具,Ambari已支持大多數(shù)Hadoop組件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeeper、Sqoop和Hcatalog等。提供Web UI進行可視化的集群管理,簡化了大數(shù)據(jù)平臺的安裝、使用難度。

二、安裝部署

2.1 主機規(guī)劃

序號 IP地址 主機名 系統(tǒng)版本
1 172.20.2.222 ambari-server centos7.3
2 172.20.2.203 hadoop-1 centos7.3
3 172.20.2.204 hadoop-2 centos7.3
4 172.20.2.205 hadoop-3 centos7.3

2.2 部署

2.2.1 基礎環(huán)境部署

a.修改主機名配置hosts

systemctl stop firewalld
hostnamectl set-hostname  ambari-server   #更改個主機名
sed -i 's/SELINUX=enforcing/SELINUX=disable/g' /etc/selinux/config
setenforce 0
cat >>/etc/hosts<<EOF    #添加各個節(jié)點hosts解析
172.20.2.222    ambari-server
172.20.2.203      hadoop-1
172.20.2.204      hadoop-2
172.20.2.205      hadoop-3
EOF

b.配置ambari-server免密鑰登錄其他節(jié)點

ssh-keygen -t rsa     #在ambari-server生成密鑰對
for num in `seq 1 3`;do ssh-copy-id -i /root/.ssh/id_rsa.pub root@hadoop-$num;done

c.在ambari-server安裝數(shù)據(jù)庫
在ambari的setup中我們可以選擇使用默認的postgresql,也可以自定義使用其他數(shù)據(jù)庫,此處選用mariadb,便于后期管理維護

yum -y install mariadb-server mysql-connector-java
systemctl start mariadb
mysql -uroot password "mysqladmin"
登錄數(shù)據(jù)庫后我們采用root登錄

d.配置本地yum源
由于ambari的各個組件包很大,HDP大約快6G,我們采取離線安裝方式,將ambari-server配置為yum源,事先在網(wǎng)上下載HDP、HDP-UTILS和Ambari
軟件版本:

參考url:ambari各版本參考鏈接
HDP和HDP UTILS參考鏈接

ambari HDP HDP-UTILS
2.4.1.0 2.5.0.0 1.1.0.21
yum install httpd -y && systemctl start httpd
mkdir /software && cd /software
#下載軟件
wget -c http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.1.0/ambari-2.4.1.0-centos7.tar.gz
wget -c http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0/HDP-2.5.0.0-centos7-rpm.tar.gz
wget -c http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7/HDP-UTILS-1.1.0.21-centos7.tar.gz
#創(chuàng)建目錄
mkdir -p /var/www/html/ambari
mkdir /var/www/html/hdp/{HDP,HDP-UTILS-1.1.0.21}
#解壓軟件
tar -zxvf ambari-2.4.1.0-centos7.tar.gz -C /var/www/html/ambari/
tar -zxvf HDP-UTILS-1.1.0.21-centos7.tar.gz -C /var/www/html/hdp/HDP-UTILS-1.1.0.21/
tar -zxvf HDP-2.5.0.0-centos7-rpm.tar.gz -C /var/www/html/hdp/
配置ambari YUM源
cat >/etc/yum.repos.d/ambari.repo<<EOF
#VERSION_NUMBER=2.4.1.0-22
[Updates-ambari-2.4.1.0]
name=ambari-2.4.1.0 - Updates
baseurl=http://172.20.2.222/ambari/AMBARI-2.4.1.0/centos7/2.4.1.0-22/
gpgcheck=1
gpgkey=http://172.20.2.222/ambari/AMBARI-2.4.1.0/centos7/2.4.1.0-22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
EOF
#配置hdp  YUM源
cat >/etc/yum.repos.d/hdp.repo<<EOF
#VERSION_NUMBER=2.5.0.0-1245
[HDP-2.5.0.0]
name=HDP Version - HDP-2.5.0.0
baseurl=http://172.20.2.222/hdp/HDP/centos7/
gpgcheck=1
gpgkey=http://172.20.2.222/hdp/HDP/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

[HDP-UTILS-1.1.0.21]
name=HDP-UTILS Version - HDP-UTILS-1.1.0.21
baseurl=http://172.20.2.222/hdp/HDP-UTILS-1.1.0.21/
gpgcheck=1
gpgkey=http://172.20.2.222/hdp/HDP-UTILS-1.1.0.21/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
EOF

2.2.2 安裝配置ambari

a.安裝ambari server

yum clean all
yum makecache
yum -y install ambari-server
#進入數(shù)據(jù)庫創(chuàng)建ambari庫和導入數(shù)據(jù)
mysql>create database ambari DEFAULT CHARSET utf8;
mysql>use ambari
mysql>source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

b.配置ambari

[root@ambari-server hdp]# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):root
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? y
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
==============================================================================
Enter choice (1): 1
To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.or
acle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.Do you accept the Oracle Binary Code License Agreement [y/n] (y)? y
Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u77
-linux-x64.tar.gzjdk-8u77-linux-x64.tar.gz... 100% (173.0 MB of 173.0 MB)
Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u77-linux-x64.tar.gz
Installing JDK to /usr/jdk64/
Successfully installed JDK to /usr/jdk64/
Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jc
e_policy-8.zip
Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip
Installing JCE policy...
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 (3): 3
Hostname (ambari-server): ambari-server
Port (3306): 
Database name (ambari): 
Username (root): root
Enter Database Password (mysqladmin): 
Configuring ambari database...
Copying JDBC drivers to server resources...
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/r
esources/Ambari-DDL-MySQL-CREATE.sqlProceed with configuring remote database connection properties [y/n] (y)? y
Extracting system views...
............
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
#啟動服務
ambari-server start

c.瀏覽器文本界面安裝
瀏覽器訪問:http://172.20.2.222:8080 默認用戶名密碼admin/admin
大數(shù)據(jù)平臺HDP搭建

啟動安裝向導
大數(shù)據(jù)平臺HDP搭建
添加將要創(chuàng)建的集群名稱
大數(shù)據(jù)平臺HDP搭建
下載hdp版本
大數(shù)據(jù)平臺HDP搭建
選擇本地hdp源
大數(shù)據(jù)平臺HDP搭建
添加寫需要安裝的各個目標節(jié)點的主機名,填寫ambari-server免密鑰登錄其他節(jié)點的私鑰,確認注冊
大數(shù)據(jù)平臺HDP搭建
大數(shù)據(jù)平臺HDP搭建
選擇需要安裝的服務
大數(shù)據(jù)平臺HDP搭建
選擇安裝軟件所在的那個節(jié)點上
大數(shù)據(jù)平臺HDP搭建

大數(shù)據(jù)平臺HDP搭建

自定義服務路徑或密碼
大數(shù)據(jù)平臺HDP搭建
Review
大數(shù)據(jù)平臺HDP搭建
進行安裝部署
大數(shù)據(jù)平臺HDP搭建
大數(shù)據(jù)平臺HDP搭建
添加服務
大數(shù)據(jù)平臺HDP搭建
查看各組件的概況和配置
大數(shù)據(jù)平臺HDP搭建
大數(shù)據(jù)平臺HDP搭建

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI