ambari+hdp安裝

Yun2集群上Ambari+HDP安裝

10余年的順德網(wǎng)站建設(shè)經(jīng)驗(yàn),針對設(shè)計(jì)、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。營銷型網(wǎng)站的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整順德建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。成都創(chuàng)新互聯(lián)從事“順德網(wǎng)站設(shè)計(jì)”,“順德網(wǎng)站推廣”以來,每個客戶項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

1.安裝環(huán)境說明:

系統(tǒng)版本:CentOS7

安裝版本:

Ambari版本:2.2.2.0

HDP版本:2.4.2.0

集群機(jī)器:

Ambari Server :yun2

Ambari Agent:yun3 ,yun4,yun6,yun18,yun19,yun20,yun21

2.操作系統(tǒng)環(huán)境準(zhǔn)備

2.1 配置SSH免密碼登錄

主節(jié)點(diǎn)里root用戶登錄執(zhí)行如下步驟:

ssh-keygen –t rsa

cd /root/.ssh

cat id_rsa.pub >>authorized_keys

分發(fā)主節(jié)點(diǎn)里配置好的authorized_keys到各從節(jié)點(diǎn):

scp  -r  /root/.ssh/authorized_keys      yun3,: /root/.ssh/authorized_keys

scp  -r  /root/.ssh/authorized_keys      yun4,: /root/.ssh/authorized_keys

scp  -r  /root/.ssh/authorized_keys      yun6,: /root/.ssh/authorized_keys

scp  -r  /root/.ssh/authorized_keys      yun18,: /root/.ssh/authorized_keys

scp  -r  /root/.ssh/authorized_keys      yun19,: /root/.ssh/authorized_keys

scp  -r  /root/.ssh/authorized_keys      yun20,: /root/.ssh/authorized_keys

scp  -r  /root/.ssh/authorized_keys      yun21,: /root/.ssh/authorized_keys

2.2 創(chuàng)建ambari系統(tǒng)用戶和用戶組

只在主節(jié)點(diǎn)操作

添加ambari安裝、運(yùn)行用戶和用戶組,也可以不創(chuàng)建新用戶,直接使用root或者系統(tǒng)其他賬號

useradd admin

passwd admin

2.3 開啟NTP服務(wù)  

所有集群上節(jié)點(diǎn)都需要操作  

yum install ntp 

systemctl is-enabled ntpd

systemctl enable ntpd

systemctl start ntpd

2.4 關(guān)閉防火墻  

所有節(jié)點(diǎn)都要設(shè)置

systemctl disable firewalld 

systemctl stop firewalld

2.5 關(guān)閉SELinux  

所有節(jié)點(diǎn)都要設(shè)置  

查看SELinux狀態(tài):  

sestatus 

如果SELinux status參數(shù)為enabled即為開啟狀態(tài)  

SELinux status: enabled  

臨時(shí)關(guān)閉,不用重啟機(jī)器:  

setenforce 0 

修改配置文件需要重啟機(jī)器:  

vi /etc/sysconfig/selinux SELINUX=disabled

3.制作本地源 

制作本地源只需在主節(jié)點(diǎn)上進(jìn)行即可  

3.1 相關(guān)準(zhǔn)備工作  

3.1.1安裝 Apache HTTP 服務(wù)器

安裝HTTP 服務(wù)器,允許 http 服務(wù)通過防火墻(永久)

yum install httpd 

firewall-cmd --add-service=http 

firewall-cmd --permanent --add-service=http

添加 Apache 服務(wù)到系統(tǒng)層使其隨系統(tǒng)自動啟動

systemctl start httpd.service

systemctl enable httpd.service

3.1.2 安裝本地源制作相關(guān)工具

下載 Ambari 2.2.2 , HDP 2.4.2 的安裝資源,本次安裝是在Centos 7 上,只列出centos7的資源,其他系統(tǒng)的請現(xiàn)在對用系統(tǒng)的資源,不同版本資源請上http://docs.hortonworks.com/index.html上查找

Ambari 2.2.2 下載資源

OSFormatURL

CentOS 7Base URLhttp://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0

CentOS 7Repo Filehttp://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo

CentOS 7Tarball md5 aschttp://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos7.tar.gz

HDP 2.4.2 下載資源

OSRepository NameFormatURL

CentOS 7HDPBase URLhttp://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0

CentOS 7HDPRepo Filehttp://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/hdp.repo

CentOS 7HDPTarball md5 aschttp://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.2.0/HDP-2.4.2.0-centos7-rpm.tar.gz

CentOS 7HDP-UTILSBase URLhttp://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7

CentOS 7HDP-UTILSRepo Filehttp://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7/HDP-UTILS-1.1.0.20-centos7.tar.gz

需要下載的壓縮包如下:

Ambari 2.2.2 http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.0.0/HDP-2.4.0.0-centos7-rpm.tar.gz  

HDP 2.4.2   http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos7.tar.gz 

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

在httpd網(wǎng)站根目錄,默認(rèn)是即/var/www/html/,

cd /var/www/html/

根據(jù)版本創(chuàng)建目錄:Ambari2.2.2.0-HDP2.4.2.0

mkdir Ambari2.2.2.0-HDP2.4.2.0

進(jìn)入/var/www/html/ambari/

cd /var/www/html/ambari/

將下載的壓縮包解壓到/var/www/html/ Ambari2.2.2.0-HDP2.4.2.0目錄

tar -zxvf ambari-2.2.2.0-centos7.tar.gz 

tar -zxvf HDP-2.4.2.0-centos7-rpm.tar.gz 

tar -zxvf HDP-UTILS-1.1.0.20-centos7.tar.gz

驗(yàn)證httd網(wǎng)站是否可用,可以使用瀏覽器直接訪問下面的地址:

HTTP://192.168.1.202/Ambari2.2.2.0-HDP2.4.2.0

3.3 配置ambari、HDP、HDP-UTILS的本地源

首先下載上面資源列表中的相應(yīng)repo文件,修改其中的URL為本地的地址,相關(guān)配置如下:

ambari.repo:

#VERSION_NUMBER=2.2.2.2.0

[ambari-2.2.2.0]

name=ambari Version - ambari-2.2.2.0

baseurl=http://192.168.1.202/Ambari2.2.2.0-HDP2.4.2.0/AMBARI-2.2.2.0/centos7/2.2.2.0-460

gpgcheck=1

gpgkey=http://192.168.1.205/Ambari2.2.2.0-HDP2.4.2.0/AMBARI-2.2.2.0/centos7/2.2.2.0-460/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins

enabled=1

priority=1

hdp.repo:

#VERSION_NUMBER=2.4.2.0-258

[HDP-2.4.2.0]

name=HDP Version - HDP-2.4.2.0

baseurl=http://192.168.1.202/Ambari2.2.2.0-HDP2.4.2.0/HDP/centos7/2.x/updates/2.4.2.0

gpgcheck=1

gpgkey=http://192.168.1.202/Ambari2.2.2.0-HDP2.4.2.0/HDP/centos7/2.x/updates/2.4.2.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins

enabled=1

priority=1

[HDP-UTILS-1.1.0.20]

name=HDP Utils Version - HDP-UTILS-1.1.0.20

baseurl=http://192.168.1.202/Ambari2.2.2.0-HDP2.4.2.0/HDP-UTILS-1.1.0.20/repos/centos7

gpgcheck=1

gpgkey=http://192.168.1.202/Ambari2.2.2.0-HDP2.4.2.0/HDP-UTILS-1.1.0.20/repos/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins

enabled=1

priority=1

將上面的修改過的源放到/etc/yum.repos.d/下面

yum clean all 

yum list update 

yum makecache 

yum repolist

4.進(jìn)行安裝Ambari

4.1 安裝Ambari2.2.2

4.1.1安裝Ambari

yum install ambari-server

如果報(bào)錯,提示:

Error: Package: ambari-server-2.2.2.0-460.x86_64 (ambari-2.2.2.0)

Requires: postgresql-server >= 8.1

原因是postgresql沒有安裝或版本太低,將Postgresql相關(guān)RPM安裝包拷入倉庫中,然后安裝

yum install postgresql-devel-9.2.7-1.el7.x86_64.rpm

yum install postgresql-server-9.2.7-1.el7.x86_64.rpm

yum install postgresql-9.2.7-1.el7.x86_64.rpm

之后再安裝Ambari

yum install postgresql-9.2.7-1.el7.x86_64.rpm

4.1.2配置Ambari

ambari-server setup 

下面是配置執(zhí)行流程,按照提示操作  

1.檢查SELinux是否關(guān)閉,輸入y:

Using python  /usr/bin/python 

Setup ambari-server 

Checking SELinux...

SELinux status is 'disabled' 

WARNING: SELinux is set to 'permissive' mode and temporarily disabled.

OK to continue [y/n] (y)? y

2.提示是否自定義設(shè)置。輸入:y 

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

3.ambari-server 賬號。直接回車 

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

Adjusting ambari-server permissions and ownership...

4.檢查防火墻,如果關(guān)閉則不用操作  

Checking firewall status... 

Redirecting to /bin/systemctl status  iptables.service 

5.設(shè)置JDK。輸入:3 ,自定義JDK

Checking JDK...

Checking JDK...

[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): 3

6.如果上面選擇3自定義JDK,則需要設(shè)置JAVA_HOME。輸入:/usr/local/jdk

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/local/jdk  Validating JDK on Ambari Server...done. Completing setup... 

7.數(shù)據(jù)庫配置。選擇:y 

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

8.選擇數(shù)據(jù)庫類型。輸入:1  ,Ambari內(nèi)置PostgreSQL數(shù)據(jù)庫

Configuring database... ============================================================================== 

Choose one of the following options: 

[1] - PostgreSQL (Embedded) 

[2] - Oracle 

[3] - MySQL 

[4] – PostgreSQL

[5] - Microsoft SQL Server (Tech Preview) 

[6] - SQL Anywhere 

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

Enter choice (1): 1 

9.設(shè)置數(shù)據(jù)庫的具體配置信息,根據(jù)實(shí)際情況輸入,如果和括號內(nèi)相同,則可以直接回車。  

Hostname (localhost):  

Port ():  

Database name (ambari): 

Username (ambari):ambari

Enter Database Password (bigdata):ambari

4.1.3啟動Amabri

執(zhí)行啟動命令,啟動Ambari服務(wù)

ambari-server start

成功啟動后在瀏覽器輸入Ambari地址:

http://192.168.1.202:8080/

出現(xiàn)登錄界面,默認(rèn)管理員賬戶登錄, 賬戶:admin 密碼:admin

 

登錄成功后出現(xiàn)下面的界面,至此Ambari的安裝成功 

 

4.2 安裝安裝HDP 2.4.2 配置集群

點(diǎn)擊上面登錄成功頁面的Launch Install Wizard 按鈕進(jìn)行集群配置

4.2.1設(shè)置集群名稱 

 

4.2.2設(shè)置HDP 安裝源

選擇HDP2.4 ,并且設(shè)置Advanced Repository Options 的信息,本次使用本地源,所以修改對用系統(tǒng)的安裝源為本地源地址。

 

4.2.3設(shè)置集群機(jī)器 

 

4.2.4 Host 確認(rèn)

確認(rèn)前面配置集群中hosts列表 中的機(jī)器是否都可用,也可以移除相關(guān)機(jī)器,集群中機(jī)器Success后進(jìn)行下一步操作。

 

4.2.5 選擇要安裝的服務(wù)

 

4.2.6各個服務(wù)Master配置 

 

4.2.6 服務(wù)的Slaves 和 Clients節(jié)配置

 

4.2.7 服務(wù)的客制化配置 

 

其中Ambari Metrics中的Grafana Admin Password必須要在初始化時(shí)設(shè)置:密碼設(shè)置為:grafana

 

HIVE的METASTORE DATAABSE的DATABASE Password也必須設(shè)置,設(shè)置為:hive

4.2.8 顯示配置信息

 

 4.2.9開始安裝

安裝各個服務(wù),并且完成安裝后會啟動相關(guān)服務(wù),安裝過程比較長,如果中途出現(xiàn)錯誤,請根據(jù)具體提示或者log進(jìn)行操作。  

全部安裝成功界面如下 

 

網(wǎng)站題目:ambari+hdp安裝
文章鏈接:http://bm7419.com/article36/igccpg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開發(fā)、手機(jī)網(wǎng)站建設(shè)外貿(mào)建站、網(wǎng)站收錄、品牌網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)