九色国产,午夜在线视频,新黄色网址,九九色综合,天天做夜夜做久久做狠狠,天天躁夜夜躁狠狠躁2021a,久久不卡一区二区三区

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
hadoop基礎(chǔ)入門教程--DKHadoop配置安裝教程

使用hadoop版本是DKH標(biāo)準(zhǔn)三節(jié)點發(fā)行版,DKHadoop版本的易用性比較好,環(huán)境部署要簡單的多,參考此篇安裝前請先下載DKHadoop版本

第一部分:準(zhǔn)備工作

1、 大數(shù)據(jù)平臺所需配置:

(1) 系統(tǒng):CentOS 6.5 64位(需默認安裝Desktop)

(2) CPU intel E3及以上。

(3) 內(nèi)存:建議最小8G,用圖計算建議32G,推薦128G。

(4) 硬盤:256G以上,推薦使用固態(tài)硬盤。

(5) 系統(tǒng)分區(qū)要求: 如無特殊需求,除swap分區(qū)外,可將剩余空間全部分配到/(根分區(qū)

(6) 網(wǎng)絡(luò)要求如無特殊情況,盡量可以接入外網(wǎng)。

(7) 至少三臺服務(wù)器(三臺服務(wù)器名字任意起,密碼須一致)。

  8安裝使用root用戶作為默認用戶

2、 遠程上傳和遠程連接工具:

(1) 若直接使用個人PC開啟的虛擬機作為服務(wù)器的基礎(chǔ),直接拷貝到虛擬機下即可。

(2) 若是使用機房服務(wù)器作平臺搭建的服務(wù)器,如若不能直接接觸到服務(wù)器,則需要使用遠程工具連接并發(fā)送安裝包

 

第二部分:服務(wù)器操作系統(tǒng)配置

 

1.修改權(quán)限

步驟:在準(zhǔn)備工作中拷貝安裝DKHPlantform.zip主節(jié)點/root/目錄后,解壓并修改文件權(quán)限(文件所有者可讀可寫可執(zhí)行,與文件所有者屬于一個用戶組的其他用戶可讀可執(zhí)行,其他用戶組可讀可執(zhí)行)。

命令:  

cd /root/

unzip DKHPlantform.zip

chmod -R 755 DKHPlantform

2. 搭建hadoop集群設(shè)置SSH免密登錄

步驟:

修改主機名  vi /etc/sysconfig/network  reboot

1)修改本機hosts文件,寫入對應(yīng)關(guān)系

命令:

vi /etc/hosts

通過按鍵盤上的insert或是I鍵進入編輯模式,編輯完成后按一下Esc鍵然后按一下Shift+:鍵,輸入wq 后回車就可以保存。輸入q回車則是放棄保存退出.

進入編輯模式后,按照規(guī)則寫入主機與ip的對應(yīng)關(guān)系(主機名稱dk41是自己命名的,如下圖)例:

   192.168.1.41    dk41

192.168.1.42    dk42

192.168.1.43    dk43

 

 
 

編輯完后,保存退出。把對應(yīng)關(guān)系拷到其他兩臺機器上。

命令:

scp  -r  /etc/hosts  192.168.1.42:/etc

scp  -r  /etc/hosts  192.168.1.43:/etc

2)執(zhí)行集群之間免密前的準(zhǔn)備工作   

a)執(zhí)行sshpass.sh的腳本的時候會去讀sshhostssshslaves這兩個文件,替換sshpass.sh中的master和slave文件。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

修改文件sshhosts,輸入全部機器的主機名,每行一個主機名(如下圖)

命令:

vi /root/DKHPlantform/autossh/sshhosts

通過按鍵盤上的insert或是I鍵進入編輯模式,編輯完成后按一下Esc鍵然后按一下Shift+:鍵,輸入wq,后回車就可以保存。輸入q回車則是放棄保存退出.

  

 

修改文件sshslaves,寫入除主機名之外的所有機器名(如下圖)

命令:

vi /root/DKHPlantform/autossh/sshslaves

通過按鍵盤上的insert或是I鍵進入編輯模式,編輯完成后按一下Esc鍵然后按一下Shift+:鍵,輸入wq,后回車就可以保存輸入q回車則是放棄保存退出.

 
 

b)執(zhí)行insExpect.sh,系統(tǒng)會裝兩個rpm包,在執(zhí)行sshpass.sh的過程中無需再輸密碼和yes,腳本自動繼續(xù)執(zhí)行。

命令:

cd /root/DKHPlantform/autossh

./insExpect.sh

按照提示多次輸入yes密碼(如下圖)

 
 

c)執(zhí)行changeMaster.sh腳本為了清空/root/.ssh目錄下的所有文件(在/root/DKHPlantform/autossh目錄下),避免在執(zhí)行sshpass.sh腳本時產(chǎn)生的新密鑰時與舊的密鑰發(fā)生沖突。

命令

./changeMaster.sh                                                   

按照提示輸入(如下圖)

  

 

3)執(zhí)行集群免SSH

a)執(zhí)行SSH:

命令:

cd /root/

./sshpass.sh 密碼

123456集群密碼,根據(jù)自己實際情況輸入。

  

 

b)防止訪問服務(wù)器時某些服務(wù)被攔截,需關(guān)閉防火墻。

命令

cd /root/DKHPlantform/autossh

./offIptables.sh

  

 

3.安裝雙機熱備份MySQL

目的:存放Hive的元數(shù)據(jù)

步驟:

1)從主節(jié)點分發(fā)mysql安裝目錄第二節(jié)點

命令:

scp -r /root/DKHPlantform/mysqlInst/ 192.168.1.42:/root/

2)主節(jié)點執(zhí)行: 

命令:                                                                                                                                                                                                                                                                                                                     

cd /root/DKHPlantform/mysqlInst/

./mysql.sh 1

ssh前往第二臺機器(從節(jié)點)并執(zhí)行:

命令:

cd /root/mysqlInst/

./mysql.sh 2

3)執(zhí)行成功之后執(zhí)行熱備份(兩臺機器上都要執(zhí)行,兩個ip互換,41上寫42,42上寫41,密碼是Mysql的密碼為:123456。平臺內(nèi)已經(jīng)設(shè)定好,請勿修改

命令:

source /etc/profile

./sync.sh 192.168.1.xxx(另一臺mysql地址) root 123456

 

4.創(chuàng)建數(shù)據(jù)庫

 步驟:

1)導(dǎo)入MySQL數(shù)據(jù)表,只在主節(jié)點執(zhí)行:

命令

mysql -uroot -p123456 < { 此處為sql文件,主目錄下文件: dkh.sql}

如:mysql -uroot -p123456 </root/DKHPlantform/dkh.sql

2)執(zhí)行完后查看一下兩臺mysql的數(shù)據(jù)表是否存在,從節(jié)點查看執(zhí)行:

命令:

mysql  -uroot  -p123456
show databases;

  

 

第三部分:DKH系統(tǒng)安裝

1)啟動安裝

步驟:執(zhí)行以下命令。

命令:

cd /root/DKHPlantform/dkh-tomcat-7.0.56/bin/

./startup.sh

2)登錄

啟動成功后瀏覽器鍵入主節(jié)點ip

登陸默認用戶名和密碼: 

Username:admin

Password: 123456

后續(xù)根據(jù)提示安裝

3)組件安裝路徑

建議采用默認安裝路徑,即/opt/dkh/,注意千萬不要放/root/,不然impala等組件的安裝可能出現(xiàn)問題

部分:常見問題解決方法

 

1、當(dāng)hdfs的zkfc出現(xiàn)如下問題時,可嘗試以下方法:

  

 

(1) 先格式化hadoopzk:hdfs zkfc -formatZK

(2) 啟動zk,sbin:  ./hadoop-daemon.sh start zkfc

(3) 設(shè)定失敗轉(zhuǎn)移的namenode: hdfs haadmin -failover nn1 nn2

2、當(dāng)hue頁面打不開,顯示如下內(nèi)容時,說明沒有創(chuàng)建hue數(shù)據(jù)庫,可在主節(jié)點執(zhí)行此文件,根據(jù)提示輸入Y即可

 
  
 

3、當(dāng)hue頁面打不開,顯示如下內(nèi)容時,可執(zhí)行如下命令解決:

# cd /opt/dkh/hue-3.12.0/build/env/bin

# ./hue syncdb        之后輸入no

    # ./hue migrate

  

 

4、Essql頁面打不開,顯示如下內(nèi)容時,可通過以下方式解決

(1) 主節(jié)點運行命令:source /etc/profile,后重啟Tomcat(注意使用shutdown命令之后,若還存在相關(guān)進程,需手動kill掉)適用于環(huán)境變量不生效的情況,比如,Java的版本識別的是1.7,而不是1.8;hdfs相關(guān)命令不識別等。

(2) 重啟Tomcat,注意使用shutdown命令之后,若還存在相關(guān)進程,需手動kill掉適用于啟動了多個Tomcat進程的情況。

  

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Sqoop學(xué)習(xí)之路 (一)
CentOS設(shè)置hadoop程序開機自啟動的方法
Ambari之三:安裝配置ambari服務(wù)器 | 旺旺知識庫
使用 Docker 搭建本地 Hadoop 集群
hadoop3自學(xué)入門筆記(2)—— HDFS分布式搭建
如何利用mysqldump備份MySQL數(shù)據(jù)庫
更多類似文章 >>
生活服務(wù)
熱點新聞
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服