ClouderaManager大數(shù)據(jù)平臺部署指南_第1頁
ClouderaManager大數(shù)據(jù)平臺部署指南_第2頁
ClouderaManager大數(shù)據(jù)平臺部署指南_第3頁
已閱讀5頁,還剩11頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、部署指南 Cloudera Manager CDH官方共給出了 3 中安裝方式。第一種方法必須要求所有機器都能連網(wǎng),由于 各種網(wǎng)絡超時錯誤,基本沒法用。第二種方法使用CM的在線yum源,在線下載很多包,同樣是超時嚴重。 第三種方法是全離線方式, 實際情況是也只能用這個。1、Cloudera Manager 的部署條件? CDH 不支持在容器中部署。? 支持Oracle JDK7,目前可使用的最新版本為1.7u80,及以上版本也支持使用oracle JDK8,同一個CDH集群中的所有節(jié)點使用的JDK版本必須一致。? 使用 Python2.4 及以上,不支持 Python3? 僅支持IPv4,且I

2、Pv6必須要disabled? 基于tar壓縮包的離線安裝方式,會在中停止支持該方式。? 支持selinux,但如果不熟悉使用方法,建議關閉。? 管理端口為 7180,此外還有很多基礎應用使用的端口,可以運行iptables,需要確認有恰當?shù)氖跈嗫刂?,例如至少要對同網(wǎng)段的訪問放開全部端口。2、Cloudera Manager 部署的幾個階段和可選擇的方式Phase 1: Install JDKInstall the JDK required by Cloudcra Manager Server, Management Sei vice, and CDH.Phase 2: Set upDa La

3、 bases Install configure, and start the databases that are required by the Cloudero Manager Ssji vet, Cloudera ddriagerrinnl Service, Hnd That are opTionfil for some CDH services.Cioudcra ins tollation PhasesPhaseThere are two options: Use the Ooudera Manager Instailer to install a supported version

4、 of the Oracle JDK in 丿3匸/二uennd on all hosts in the dustor. Uso th。connmarid lino to martially install supported versions of ths Oracle JCK and set t*ie j=l7a hqmi environment variable to the iretail directory on all hostsThere are two options: Use the ClouderaInstaller lo install configure, and st

5、art anei 11 bedded PoslgrssSOL database.* Use comnand-line package installation tools like yumto irstall, configure, and install the databasePhase 去 InslallCloudefd MaiMgerServerInstall and start Cloudera Manager Server on onm host.Phase 牟:Install Cloudcra ManagerInstall and siarl. the Cloudera Mana

6、ger Agent on dll hosts.Path APath BPathCUse the ClouderaManayttr Inslaller to install its packages and the server RequirBS Intfirnet access and Eudo privileges on the hostUse Linux package install commands (like yunj to install Ckxidera Maragar Server Update database properties.Use service commands

7、to start Cloudera Manager Server.Linux commands to unpack tarballs and service commands to start the server.Use the Cloudero Manager Instalktion wizard to install the AgtsiiLs on dll hosts.There are two options:* Use Linux package install commanda (like 7) to install Cloudera Managti Agents on all h

8、oses.Use Linux commands to unpack tarballs and ber vice coinrnands to start if e aq«nis on all hosts. Use the Cloudera Manager Installation wizard to install the Agents on all hosts.Ptiase 5: InsiallCDH and Managed Service softwareInll, configure, And start CDH and managed services on all host?

9、.Use the Cloudera Manager Installation wizard to install CDH and nthsr msnagerf services.Thefe are two options: Use the Cloudera Maridijer trblalldUori wizard to install CDH And other managed services Use I inux package install commands Qilc舊to install CDH and other managed services on ell hostsUse

10、Linux commands to unpack tarballs and service commands to Rtart CDH詞nti m罰旳開 services on all hosts.PiMMS C: Ciedle, Configuie arid Start CDH 目 ndSei vicesConfiqure and sian CDH and niaridijed services.Usu the Cluudef dManager Installatiuii wizard to install CDH and olliei services, assign roles io a

11、nd configure lhe cluster. Manv configurations are automated.Use the Clouderd IVandyer Insidllatiui 1 wizard ic install CDH and olhef 'liaridged services.日Esiqn roles To hosts, ar kJ confiyuie the cluster. Many configurations are automated.Use the Cluddera Manager Installatiun wizard to install C

12、DH and ulher rnandqed services, assiqn roles 10 hosts, and configuie the duster. Many confiQurations are automated.You can also use tfie Cloudera Manager API to manage a cluster, which ran he useful for scripting preconfigured deplo/msnts.注:因為Cloudera Manager的官方y(tǒng)um源位于國外,受網(wǎng)速影響而無法正常使 用。所以上述部署方式中,一般是使用

13、 PATH C或者在預先下載好相關 RPM包 的條件下參照PATH B方式。3、主機節(jié)點信息和基礎配置(1)主機信息本次部署使用以下主機,前兩個作為 NameNod使用。后四個主機,分別額 外掛載一塊1TB的磁盤到本地的/dfs/dn目錄下。注1:用于大數(shù)據(jù)平臺的數(shù)據(jù)磁盤不要配置 RAID,直接裸盤即可。如果有RAID 控制器,則直接對每塊盤設置一個單獨的RAID0仍然當作單盤使用。注2:在有第二塊數(shù)據(jù)盤的情況下,繼續(xù)掛載到/dfs/dn2,更多的數(shù)據(jù)盤則 按命名規(guī)則和掛盤規(guī)則擴展即可。注3:對于生產(chǎn)環(huán)境而言,NameNod所在的節(jié)點一般不要同時做數(shù)據(jù)節(jié)點使 用。而且NameNod所在主機的磁

14、盤需要配置適當?shù)?RAID保護級別,以提高可靠 性。注 4:對于 DataNode 所在的主機節(jié)點, 建議系統(tǒng)盤和數(shù)據(jù)盤完全隔離開, 然 后系統(tǒng)盤使用兩磁盤配置為RAID1以提高可靠性。雖然數(shù)據(jù)節(jié)點是冗余的,掛一 個也不影響CDH平臺運行,但修起來還是很麻煩啊。cluster-70cluster-71cluster-72cluster-73cluster-74cluster-75操作系統(tǒng)全部使用 CentOS 6.9 Minimal 安裝。將全部主機的主機名設置好, 并將以上映射關系寫到每個主機的 /etc/hosts 文件中。(2)免密登錄在 cluster-70 節(jié)點上制作 ssh 密鑰:

15、 ssh-keygen將該密鑰分發(fā)至其它各節(jié)點,以實現(xiàn)免密鑰登錄,如: ssh-copy-id cluster-71( 3) selinux 和 iptables所有節(jié)點配置為關閉 selinux 。所有節(jié)點的 iptables 設置為對同網(wǎng)段地址放開全部端口的訪問權限。(4)系統(tǒng)性能參數(shù)調(diào)整中即可。cat << EOF >> /etc/sysctl.confvm.swappiness = 0 = 1 = 1 = 1024 65000EOFsysctl -pecho never > /sys/kernel/mm/transparent_hugepage/defra

16、g echo never > /sys/kernel/mm/transparent_hugepage/enabled cat << EOF >> /etc/rc.localecho never > /sys/kernel/mm/transparent_hugepage/defrag echo never > /sys/kernel/mm/transparent_hugepage/enabled EOF4、安裝 JDK下載并分發(fā) Oracle JDK 安裝包至所有節(jié)點,執(zhí)行安裝和配置命令。rpm -ivh jdk-7u80-linux-x64.rpm 直

17、接刷下面腳本完成配置: cat << EOF >> CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOMEexport PATHexport CLASSPATHEOFsource /etc/profile以上JDK配置,需要在每個節(jié)點上都處理5、安裝和配置數(shù)據(jù)庫主要有以下業(yè)務會使用到數(shù)據(jù)庫服務:Cloudera Manager ,存放各種服務、配置數(shù)據(jù),空間大約100MB ,很重要,應經(jīng)常備份 ;Oozie Server - Contains Oozie workflow,

18、coordinator, and bundle data. Can grow very large.Sqoop Server - Contains entities such as the connector, driver, links and jobs. Relatively small.Activity Monitor - Contains information about past activities. In large clusters, this database can grow large. Configuring an Activity Monitor database

19、is only necessary if a MapReduce service is deployed.Reports Manager - Tracks disk utilization and processing activities over time. Medium-sized.Hive Metastore Server - Contains Hive metadata. Relatively small.Hue Server - Contains user account information, job submissions, and Hive queries. Relativ

20、ely small.Sentry Server - Contains authorization metadata. Relatively small.Cloudera Navigator Audit Server - Contains auditing information. In large clusters, this database can grow large.Cloudera Navigator Metadata Server - Contains authorization, policies, and audit report metadata. Relatively sm

21、all.( 1)因為準備使用 cluster-70 作為 NameNodeMaster ,所以把 mysql 數(shù)據(jù)庫安 裝在 cluster-71 上面 ,以分散下風險。登錄 cluster-71 ,然后使用任一種自己熟悉的方式把 mysql 數(shù)據(jù)庫安裝好即 可: yum install mysql-server mysql chkconfig mysqld on service mysqld start 完成數(shù)據(jù)庫初始化: /usr/bin/mysql_secure_installation(2)優(yōu)化數(shù)據(jù)庫配置 service mysqld stop 將舊的 InnoDB log 文件移走:

22、/var/lib/mysql/ib_logfile0 and /var/lib/mysql/ib_logfile1 out of /var/lib/mysql/參照下面調(diào)整f參數(shù),以更適合CDHR務使用: mysqld datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0 transaction-isolation = READ-CO

23、MMITTED key_buffer_size = 32M max_allowed_packet = 32M thread_stack = 256K thread_cache_size = 64query_cache_limit = 8M query_cache_size = 64M query_cache_type = 1 max_connections = 550 #binlog_format = mixed read_buffer_size = 2Mread_rnd_buffer_size = 16M sort_buffer_size = 8M join_buffer_size = 8M

24、 # InnoDB settings innodb_file_per_table = 1innodb_flush_log_at_trx_commitinnodb_log_buffer_size = 64M innodb_buffer_pool_size = 2Ginnodb_thread_concurrency = 8 innodb_flush_method = O_DIRECT innodb_log_file_size = 512Mmysqld_safe log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid sql

25、_mode=STRICT_ALL_TABLES啟動mysql,如果有報錯,可根據(jù)日志信息排查3)創(chuàng)建需要使用的幾個庫I RoleDatabaseUserPassword1Activity Monitoramonamonamon_pa$<wordRepcrts Managerrmanrmanrman_passwordHive Metastore Servermetastorehivehive_pasewordSentry Serversentrysentrysen try_pa sswordCloudera Navigaior Audit Servernavnavnav.passwordC

26、loudera Naviyato Metadata Serverravmsnavmsna v ms_pa55wordcreate database database DEFAULT CHARACTER SET utf8;grant all o n database.* TO 'user''%' IDENTIFIED BY 'password'注:在部署中發(fā)現(xiàn)hive , oozie使用的庫需要使用latin字符集,否則在啟動服 務時日志中會報錯創(chuàng)建索引時超長度限制。(4)安裝程序驅(qū)動包 mysql jdbc driver總計有以下角色所在的主機需

27、要安裝這個驅(qū)動包。 如果你把以下角色都部署 在一個主機節(jié)點上,那就只需要安裝一個節(jié)點的驅(qū)動,否則就需要各節(jié)點都部署 一下。Cloudera Manager Server host,ActivityMonitor. Reports Manager, HiveMetastore Server, Hue Server, Sentry Server, Cloudera Navigator Audit Server, and Cloudera Navigator Metadata Server從以下網(wǎng)址下載需要使用的驅(qū)動包:tar -zxvfmysql-c onn ector-java-mkdir -p

28、 /usr/share/java/cp mysql-connector-java- /usr/share/java/mysql-connector-java.jar6配置NTP時間同步服務在所有節(jié)點上安裝和啟用。如果是內(nèi)網(wǎng)環(huán)境,也需要另想辦法保證所有節(jié)點 的系統(tǒng)時間嚴格同步。yum -y install ntpservice ntpd restartchkconfig ntpd on注:請選擇一個節(jié)點做為 ntp server 直接和外部時間服務器同步,其它所 有節(jié)點均配置 /etc/ntp.conf ,將同步的 server 信息指向前面這個節(jié)點即可。7、安裝 Cloudera Manage

29、r Server 軟件我們選擇把 Cloudera Manager Server 部署在 cluster-70 節(jié)點上。(1)下載和分發(fā)安裝資源cloudera manager 下載地址:/cm/5/cdh parcels 下載地址:/parcels/wget -c /cm/5/cloudera-manager-el6-wget -c /parcels/5.12/CDH-wget -c/parcels/5.12/CDH-wget -c/parcels/5.12/manifest.json變更為sha,否則上傳到系統(tǒng)中后,CDH平臺反而會說找不到sha文件。將 cloudera-manager-

30、el6- 文件放到所有節(jié)點的 /opt/cloudera-manager 目錄下。mkdir /opt/cloudera-managercd /opttar zxvf cloudera-manager-el6-(2)創(chuàng)建 CM Server 系統(tǒng)用戶賬號useradd -system -home=/opt/cloudera-manager/cm- -no-create-home -shell=/bin/false -comment "Cloudera SCM User" cloudera-scm(3)創(chuàng)建 CM Server 的本地數(shù)據(jù)存儲目錄登錄 cluster-70 :

31、mkdir -p /var/lib/cloudera-scm-serverchown cloudera-scm:cloudera-scm /var/lib/cloudera-scm-server( 4)配置所有節(jié)點上的 Cloudera Manager Agentssed -i 's/server_host=localhost/server_host=cluster-70/' /opt/cloudera-manager/cm-(5)創(chuàng)建和初始化 CM Server 數(shù)據(jù)庫我們的 mysql 數(shù)據(jù)庫是安裝在 cluster-71 上面,登錄 cluster-71部署一個JDBC驅(qū)

32、動包:cp mysql-connector-java- /opt/cloudera-manager/cm-初始化腳本語法如下:scm_prepare_database.sh database-type options database-name username password/opt/cloudera-manager/cm- mysql -hlocalhost -uroot -pHstest2017 scm scm scm屏幕輸出信息:JAVA_HOME=/usr/java/Verifying that we can write to /opt/cloudera-manager/cm-Cr

33、eating SCM configuration file in /opt/cloudera-manager/cm-Executing: /usr/java/ -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle- connector-java.jar:/opt/cloudera-manager/cm-/opt/cloudera-manager/cm- main DbCommandExecutor INFO Successfully connected to database.All done, your SCM

34、 database is configured correctly!登錄mysql,增加一條對CM Server主機的訪問授權:grant all on scm.* TO 'scm''cluster-70' IDENTIFIED BY 'scm'登錄 cluster-70 節(jié)點配置 CM Server 的數(shù)據(jù)庫配置文件:/opt/cloudera-manager/cm-需要根據(jù)實際情況更新以下參數(shù)。6)創(chuàng)建 CDH Parcel 資源目錄在 cluster-70 節(jié)點上:mkdir -p /opt/cloudera/parcel-repo將以下已

35、經(jīng)準備好的 parcel 資源文件放入該目錄:? CDH-? CDH-? manifest.jsonchown -R cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo在其它所有節(jié)點上:mkdir -p /opt/cloudera/parcelschown cloudera-scm:cloudera-scm /opt/cloudera/parcels( 7)啟動 cloudera manager server and agents直接使用 root 運行啟動腳本即可,腳本中已經(jīng)默認設定為會切換到 cloudera-scm 用戶運行進程。在所有

36、節(jié)點上,先調(diào)整下文件屬主權限:chown -R cloudera-scm:cloudera-scm /opt/cloudera-manager在 cluster-70 節(jié)點上啟動 CM Server :/opt/cloudera-manager/cm-start在所有節(jié)點上啟動 CM agent:/opt/cloudera-manager/cm-start注:在啟動上面的服務時,注意檢查進程是否運行,是否因報錯退出??梢?檢查 ././log/下面的日志文件,分析錯誤原因。8、登錄Cloudera Manager管理控制臺并配置 CDH服務訪問以下地址:.70:7180/cmf初始管理賬號信息

37、為: admin/admin(1)登錄后按提示操作,先是選擇 license 許可,如果沒采購企業(yè)許可, 就選免費版,繼續(xù)。(2) 選擇要加入CDH集群的主機,因為我們已經(jīng)配置好 6臺主機的訪問關 系了,這 6 個主機會被自動識別出來,選中然后下一步。(3) 安裝CDH服務的方式,選擇使用Parcels,因為之前已經(jīng)把離線安裝資 源放到系統(tǒng)默認的路徑下了,這里會自動識別到,點擊下一步將開始在CDH集群 各節(jié)點中分發(fā)所有需要使用的應用的 parcels 安裝資源。( 4 )經(jīng)過一個主機正確性檢查的步驟,點擊完成按鈕。如果系統(tǒng)提示有參 數(shù)配置上的優(yōu)化建議,遵照處理后重新做檢驗檢查即可。(5) 選擇一種集群服務組合,如果不確定哪個組合更合適,選擇“全部服 務”也可以。(6) 進入集群角色分配環(huán)節(jié),這一步比較關鍵,注意要把NameNod分配到 我們設計的cluster-70 節(jié)點,SecondaryNameNod分配到cluster-71 節(jié)點上。 注意調(diào)整HDFS的 DataNode角色,自定義分配到cluster-72 到cluster-75 這4 個節(jié)點上。 注意有多個服務的角色是還沒有分配的, 請將這些角色統(tǒng)一都分配到 cluster-71 節(jié)點上即可,這樣做是因為簡化數(shù)據(jù)節(jié)點的角色和職責,便于維護,且 cluster-70 節(jié)點已經(jīng)被默認分配

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論