Cloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建(CDH5.13.1)傻瓜式使用說明_第1頁(yè)
Cloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建(CDH5.13.1)傻瓜式使用說明_第2頁(yè)
Cloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建(CDH5.13.1)傻瓜式使用說明_第3頁(yè)
Cloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建(CDH5.13.1)傻瓜式使用說明_第4頁(yè)
Cloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建(CDH5.13.1)傻瓜式使用說明_第5頁(yè)
已閱讀5頁(yè),還剩43頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Cloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建(CDH5.13.1版)版本vl.O作者郭維忠發(fā)布日期2018-03-10目錄TOC o 1-5 h zCloudera大數(shù)據(jù)平臺(tái)環(huán)境搭建1 HYPERLINK l bookmark0 o Current Document (CDH5.13.1版)1 HYPERLINK l bookmark4 o Current Document 1.基礎(chǔ)環(huán)境4 HYPERLINK l bookmark6 o Current Document 1.1.軟件環(huán)境4. HYPERLINK l bookmark8 o Current Document 1.2.配置規(guī)劃4. HYPE

2、RLINK l bookmark10 o Current Document 所需要的軟件資源4. HYPERLINK l bookmark16 o Current Document 修改機(jī)器名(所有節(jié)點(diǎn))5.設(shè)置防火墻(所有節(jié)點(diǎn))6. HYPERLINK l bookmark40 o Current Document 1.6.配置免密碼登錄SSH6. HYPERLINK l bookmark62 o Current Document 關(guān)閉SELINUX(所有節(jié)點(diǎn))8. HYPERLINK l bookmark64 o Current Document 修改Linux內(nèi)核參數(shù)(所有節(jié)點(diǎn))8. H

3、YPERLINK l bookmark66 o Current Document 其他安裝與配置(所有節(jié)點(diǎn))1.0 HYPERLINK l bookmark70 o Current Document 配置NTP服務(wù)10 HYPERLINK l bookmark102 o Current Document 安裝oracleJDK1.8(所有節(jié)點(diǎn))1.2 HYPERLINK l bookmark128 o Current Document Mysql安裝(主節(jié)點(diǎn))1.3 HYPERLINK l bookmark156 o Current Document 安裝CM15 HYPERLINK l bo

4、okmark158 o Current Document 2.1.傳包,解包1.52.2.創(chuàng)建數(shù)據(jù)庫(kù)1.5創(chuàng)建用戶1.6 HYPERLINK l bookmark180 o Current Document 制作本地YUM源1.6.拷貝jar包1.7. HYPERLINK l bookmark192 o Current Document 修改cloudera-scm-agent配置1.7 HYPERLINK l bookmark200 o Current Document 啟動(dòng)CMServer和Agent1.8 HYPERLINK l bookmark202 o Current Documen

5、t 訪問CM1.8 HYPERLINK l bookmark204 o Current Document 安裝CDH18 HYPERLINK l bookmark206 o Current Document 3.1.登錄后界面1.8選擇CM版本1.9.指定主機(jī)2.0選擇CDH版本2.1出現(xiàn)“主機(jī)運(yùn)行狀態(tài)不良”錯(cuò)誤2.2 HYPERLINK l bookmark228 o Current Document 3.5.檢查主機(jī)正確性2.3 HYPERLINK l bookmark232 o Current Document 選擇安裝的服務(wù)2.3 HYPERLINK l bookmark236 o C

6、urrent Document 角色分配2.4數(shù)據(jù)庫(kù)設(shè)置.測(cè)試連接報(bào)錯(cuò):2.5群集設(shè)置2.6-TOC o 1-5 h z HYPERLINK l bookmark250 o Current Document 開始安裝2.8 HYPERLINK l bookmark254 o Current Document 安裝完成.警告信息:2.9 HYPERLINK l bookmark266 o Current Document 4.常見錯(cuò)誤31 HYPERLINK l bookmark268 o Current Document 初始化數(shù)據(jù)庫(kù)錯(cuò)誤:3.1 HYPERL

7、INK l bookmark288 o Current Document 未能連接到HostMonitor3.2-丄-丄1.基礎(chǔ)環(huán)境軟件環(huán)境本文將介紹Centos7.4離線安裝CDH和ClouderaManager過程,軟件版本如下:NO.軟件名稱版本1.操作系統(tǒng)Centos7.464位2.JDKjdk-8u151-linux-x643.ClouderManager5.13.14.CDH5.13.15.數(shù)據(jù)庫(kù)Mysql5.76.JDBCmysql-connector-java-5.1.43.jar配置規(guī)劃本次安裝共5臺(tái)服務(wù)器,服務(wù)器配置及用途如下:NO.機(jī)器名稱內(nèi)網(wǎng)IP配置用途1.node16

8、8688C/32Gb/1TB主,CM,MysqlDB2.node169698C/32Gb/1TB從3.node170708C/32Gb/1TB從4.node171718C/32Gb/1TB從5.node172728C/32Gb/1TB從所需要的軟件資源JDK環(huán)境:JDK版本:1.8.0_151jdk-8u151-linux-x64.rpm下載地址: HYPERLINK /technetwork/java/javase/downloads/jdk8-downloads /technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlCM

9、包:CM版本:5.13.1cloudera-manager-centos7-cm5.13.1_x86_64.tar.gz下載地址: HYPERLINK /cm5/cm/5/cloudera-manager-centos7-cm5.13.1_x86_64.tar.gz /cm5/cm/5/cloudera-manager-centos7-cm5.13.1_x86_64.tar.gzCDH包CDH版本:5.13.1,CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel;CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1;manifest.

10、json下載地址: HYPERLINK /cdh5/parcels/5.13.1/manifest.json /cdh5/parcels/5.13.1/manifest.json HYPERLINK /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1 /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1 HYPERLINK /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel

11、/cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcelJDBC連接jar包:jar包版本:5.1.43,mysql-connector-java-5.1.43.jar下載地址: HYPERLINK /maven2/mysql/mysql-connector-java/5.1.43/mysql-connector-java-5.1.43.jar /maven2/mysql/mysql-connector-java/5.1.43/mysql-connector-java-5.1.43.jar修改機(jī)器名(所有節(jié)點(diǎn))修改機(jī)器名稱#host

12、namectlset-hostnamexxx/設(shè)置機(jī)器名#hostname/查看本機(jī)名這種方式,在Centos7中可以永久性改變主機(jī)名稱。2)每個(gè)節(jié)點(diǎn)機(jī)器,都要配置hosts#vi/etc/hosts內(nèi)容都改為:localhost/建議保留此行68node16869node16970node17071node17172node172設(shè)置防火墻(所有節(jié)點(diǎn))注:為了簡(jiǎn)便,可以先關(guān)閉防所有節(jié)點(diǎn)火墻,安裝完成后,再按照下面步驟設(shè)置。防火墻常用命令:#firewall-cmd-state(查詢防火墻狀態(tài))#systemctlstopfirewalld.service(關(guān)閉防火墻)#systemctlst

13、artfirewalld.service(開啟防火墻)#systemctldisablefirewalld.service(禁止firewall開機(jī)啟動(dòng))設(shè)置防火墻策略,在所有節(jié)點(diǎn)執(zhí)行下面腳本(執(zhí)行前要啟動(dòng)防火墻):集群機(jī)器間可以相互訪問firewall-cmd-permanent-add-rich-rule=rulefamily=ipv4sourceaddress=68portprotocol=tcpport=0-65535acceptfirewall-cmd-permanent-add-rich-rule=rulefamily=ipv4sourceaddress=69portprotoco

14、l=tcpport=0-65535acceptfirewall-cmd-permanent-add-rich-rule二rulefamily二ipv4sourceaddress二70portprotocol二tcpport二0-65535acceptfirewall-cmd-permanent-add-rich-rule二rulefamily二ipv4sourceaddress二71portprotocol二tcpport二0-65535acceptfirewall-cmd-permanent-add-rich-rule二rulefamily二ipv4sourceaddress二72portp

15、rotocol二tcpport二0-65535accept/設(shè)置可以訪問的端口firewall-cmd-permanent-add-port=0-65535/tcpfirewall-cmd-reload注意:需要在所有的節(jié)點(diǎn)上執(zhí)行,因?yàn)樯婕暗降亩丝谔嗔?,臨時(shí)開放所有端口是為了安裝起來方便,安裝完畢后可以根據(jù)需要設(shè)置防火墻策略,保證集群安全。配置免密碼登錄SSH將子節(jié)點(diǎn)設(shè)置為從主節(jié)點(diǎn)ssh無密碼登陸(主節(jié)點(diǎn)訪問從節(jié)點(diǎn)需要無密碼互通,否則后面會(huì)出現(xiàn)問題)在主節(jié)點(diǎn)上執(zhí)行:#cd/進(jìn)入至U根目錄#ssh-keygen-trsa一路回車,生成無密碼的密鑰對(duì)。Lroct世n目menodehome#ssh

16、-keygen-trsaGenera七亠“public/piivatersakeypair.Enterflle1nwhichtosavethekey(./root/.ssh/idrsaj:/root/.slvitJ_rsaalreadyexists.ICuerwrite(y/rJ?yEnterpassphrasefemptyfornopassphrase):匚nterpassphraseagain:Youridentificationhasbeensavedin/root/.ssh/idrsa.Yourpublickeyhasbeersavedin/root/.ssh/idrsa.pub.Th

17、ekeyfingerprintis:9G:b4:4a:31:6a:8a:13:02:c8:e8:69:79:3d:72:26:43root(3namierodeThekeysrardomartimage1s:+-FtSA2Q481+|+.o把公鑰拷貝至node169服務(wù)器上:#scp/root/.ssh/id_rsa.pubrootnode169:輸入node169機(jī)器上root用戶密碼拷備成功登錄到node169服務(wù)器上:然后在node169服務(wù)器上,把公鑰的內(nèi)容追加到authorized_keys文件末尾(這個(gè)文件也在隱藏文件夾.ssh下,如果沒有可以新建):#catid_rsa.pub/

18、.ssh/authorized_keys如果提示下面信息,則需要?jiǎng)?chuàng)建/ssh目錄:-bash:/root/.ssh/authorized_keys:Nosuchfileordirectory/創(chuàng)建/.ssh目錄,再追加公鑰內(nèi)容#mkdir/.ssh#catidrsa.pub/.ssh/authorizedkeys并設(shè)置authorized_keys的訪問權(quán)限:#chmod600/.ssh/authorizedkeys測(cè)試:在node168點(diǎn)上執(zhí)行sshnode169,正常情況下,不需要密碼就能直接登陸進(jìn)去了。在node168節(jié)點(diǎn)出現(xiàn)下面表示成功登錄node169節(jié)點(diǎn):root(&nodel68

19、#sshnodel69Lastlogin:ThuMar2209:39:522018from68rootnodel69|以同樣的方式將公鑰拷貝至其他節(jié)點(diǎn)服務(wù)器上。關(guān)閉SELINUX(所有節(jié)點(diǎn))關(guān)閉linuxSELINUX安全內(nèi)核#setenforce0(臨時(shí)生效)修改/etc/selinux/config下的SELINUX=disabled(重啟后永久生效)#vi/etc/selinux/config內(nèi)容增加:SELINUX二disabled重啟后生效:#reboot查看SELINUX是否關(guān)閉:#sestatus(在Centos7中遇到SELINUX無法關(guān)閉的問題,重新啟動(dòng)機(jī)器恢復(fù)正常)修改Li

20、nux內(nèi)核參數(shù)(所有節(jié)點(diǎn))為避免安裝過程中出現(xiàn)的異常問題,首先調(diào)整Linux內(nèi)核參數(shù)。1)設(shè)置swappiness,控制換出運(yùn)行時(shí)內(nèi)存的相對(duì)權(quán)重,Cloudera建議將swappiness設(shè)置為10:/查看swappiness#cat/proc/sys/vm/swappiness/永久性修改,執(zhí)行下面兩條命令#sysctl-wvm.swappiness=10#echovm.swappiness=10/etc/sysctl.conf2)關(guān)閉透明大頁(yè)面:自CentOS6版本開始引入了TransparentHugePages(THP),從CentOS7版本開始,該特性默認(rèn)就會(huì)啟用。盡管THP的本意是

21、為提升內(nèi)存的性能,不過某些數(shù)據(jù)庫(kù)廠商還是建議直接關(guān)閉THP,否則可能會(huì)導(dǎo)致性能出現(xiàn)下降。首先查看透明大頁(yè)是否啟用,alwaysnever表示已啟用,alwaysnever表示已禁用:#cat/sys/kernel/mm/transparent_hugepage/defragalwaysmadvisenever#cat/sys/kernel/mm/transparent_hugepage/enabledalwaysmadvisenever以上狀態(tài)就說明是啟用的。臨時(shí)關(guān)閉(重啟機(jī)器會(huì)變回默認(rèn)開啟狀態(tài)):#echonever/sys/kernel/mm/transparent_hugepage/de

22、frag#echonever/sys/kernel/mm/transparenthugepage/enabled永久關(guān)閉:編輯/etc/rc.d/rc.local#vi/etc/rc.d/rc.local/在文件后添加下面內(nèi)容:iftest-f/sys/kernel/mm/transparent_hugepage/enabled;thenechonever/sys/kernel/mm/transparent_hugepage/enabledfiiftest-f/sys/kernel/mm/transparent_hugepage/defrag;thenechonever/sys/kernel/

23、mm/transparent_hugepage/defragfi保存退出,然后賦予rc.local文件執(zhí)行權(quán)限:#chmod+x/etc/rc.d/rc.local重啟系統(tǒng),以后再檢查THP狀態(tài),顯示狀態(tài)被禁用了。root做root做nodE:石5sys/kernel/nnm/transparent_hjgepage/defalwaysmadvlseCneverJ)rootOnodel6Ekernel/mm/transparent_hgqpJige/enab1sdalwaysmadviseOneverLroot(nodel68曠.3)修改文件句柄數(shù):修改系統(tǒng)文件句柄數(shù)限制:查看文件句柄數(shù),顯示

24、查看文件句柄數(shù),顯示1024,顯然太小#ulimit-n其他安裝與配置(所有節(jié)點(diǎn))為避免安裝過程中出現(xiàn)異常問題,安裝相關(guān)依賴包:#yum-yinstallpsmiscMySQL-pythonatbcbind-libsbind-utilscups-clientcups-libscyrus-sasl-gssapicyrus-sasl-plainedfUsefuse-libshttpdhttpd-toolskeyutils-libs-develkrb5-devellibcom_err-devellibselinux-devellibsepol-devellibverto-develmailcapno

25、archmailxmod_sslopenssl-develpcre-develpostgresql-libspython-psycopg2redhat-lsb-coreredhat-lsb-submod-securityx86_64spaxtimezlib-devel#yuminstall-ypython-lxml#yuminstallkrb5-develcyrus-sasl-gssapicyrus-sasl-develibxml2-devellibxslt-develmysqlmysql-developenldap-develpython-develpython-simplejsonsqli

26、te-develchmod+x/etc/rc.d/rc.local#yum-yinstallrpcbindsystemctlstartrpcbindechosystemctlstartrpcbind/etc/rc.d/rc.local配置NTP服務(wù)集群中所有主機(jī)必須保持時(shí)間同步,如果時(shí)間相差較大會(huì)引起各種問題。具體建設(shè)過程如下:所有節(jié)點(diǎn)安裝相關(guān)組件:#yuminstallntpntpdate-yNTP服務(wù)端(主節(jié)點(diǎn)):1)查找時(shí)間同步服務(wù)器:打開網(wǎng)址,內(nèi)容如下:AsiaasiapooLTousethis呂p皂匚辻ifpoolzone,addth已followingtoyourntp.conff

27、ileserverQ.畝mi口o濟(jì)1mt口,carsseri/er1.asla.po*l.ntp.ccrgserverNasia口ool匕此口.ctrg=qe*v口t*3.asia.pool.rrL2)編輯/etc/ntp.conf:#vi/etc/ntp.conf在文件中輸入上面網(wǎng)頁(yè)內(nèi)容:serverO.啟動(dòng)ntp服務(wù):#systemctlstartntpd配置開機(jī)啟動(dòng):#systemctlenablentpd.service注意:如果ntpd開機(jī)啟動(dòng)失效,有可能是因?yàn)榘惭b了chronyd并且是開機(jī)自啟狀態(tài),所以導(dǎo)致ntpd開機(jī)自啟失敗。#查看chronyd設(shè)置狀態(tài)#systemctlsta

28、tuschronyd顯示如下:r(wt?nodel69-*systenctlstatuschronyd*盧hfi?rridi航OTHi占E町1idfl時(shí)卑m|Loaided:load-edC/usr/11b/sysi.:aj:rlsi;dlii/rrlndg1nan;ctTQnyd(BjnmmcIrony-confC5ESDp&sIueepc!deaIM737e.ecstartposr-/u5r/11bexec/chrcmy-he1perupdaTe-diiDH(CDde-esTied,srarus-D/succESSj720-Esec5tartESDp&sIueepc!deaIM/sysre

29、ni.ince/chrenyd.seric-e727/usr/sbin/ctwonydwarMarMarMarMarMarMarMarMarMarwarMarMarMarMarMarMarMarMarMarracktenodeisg|19:4239ll:4Ji27LL;4i;Zfl11:43231L:4Ji2911:44:2311:44134il:45i3711:45:39-11;45;43nocl&169nadeL69nodeLO?rodelS?nad&169nadc-lfiOnodeLG?nod&169nadtlfi?nadeio?clclClchrwrydchrgrr/d727727材7

30、27727727冷727727b冇jsysceiiclockMrongby-2B752.6&9675secortii嘉ClfKk歸SCepfm!try-iB/SJ.6MS75:5flllCiedsourceG9,00.llSrlZGzScHirce69.6Q丄16.126replacedwith2O3ul35-lB4:123lisellectedsource21:匚ants-nchronisc:naslactAblasources:Selectedsource.23T,6420:cants/nchrofl1se:noslcraibleiaurces:Selectedsaurce69.GO.11

31、4-_22J5elecxedsource203,115,154,123srarLd以面表明,chronyd顯示為開機(jī)啟動(dòng)狀態(tài)。將chronyd設(shè)為禁用狀態(tài):#systemctldisablechronyd.service此時(shí),NTP的服務(wù)開機(jī)自啟動(dòng)完成!5)檢查是否設(shè)置成功:#ntpq-p更新時(shí)間#timedatectlNTP客戶端(所有從節(jié)點(diǎn)):遠(yuǎn)程客戶端時(shí)間同步測(cè)試#date#ntpdate6868是NTP服務(wù)端IP,顯示如下信息,測(cè)試成功:root(&nodel72#bsteThuMar2216:4+;00C5TZO1SLrr0tnodel72#ntpdate172r16,3-16822

32、Mar16:4-1:25ntpdate1152:adjusttimeserver68offset-0.00622secruutniudel72|客戶端設(shè)置計(jì)劃任務(wù),每30分鐘同步時(shí)間#crontab-e加入內(nèi)容:0-59/30*/usr/sbin/ntpdate68&/sbin/hwclock-w設(shè)置定時(shí)任務(wù)開機(jī)啟動(dòng)/設(shè)置開機(jī)啟動(dòng)#systemctlenablecrond.service查看狀態(tài)#systemctlstatuscrond安裝oracleJDK1.8(所有節(jié)點(diǎn))下載rpm安裝包jdk-8u151-linux-x64.rpmCentOS系統(tǒng)一般自帶OpenJdk,需要卸載掉自帶的O

33、penJdk,使用#rpm-qa|grepjava查詢java相關(guān)的包,使用#rpm-e-nodeps+包名強(qiáng)制卸載掉,下面安裝oralceJDKrpm-ivhjdk-8u151-linux-x64.rpm配置JAVA_HOME環(huán)境變量:修改/etc/profile文件配置環(huán)境變量,執(zhí)行命令:vi/etc/profile在profile文件最后,輸入下面內(nèi)容,保存并退出。exportJAVA_HOME=/us叨ava/jdk1.8.0_151exportPATH=$PATH:$JAVAHOME/bin執(zhí)行下面命令,讓配置生效source/etc/profile使修改立即生效echo$PATH查

34、看PATH值echo$JAVAHOME查看JAVAHOME值在Centos7中修改/etc/profile文件配置環(huán)境變量,機(jī)器啟動(dòng)后有時(shí)不生效,可以修改/etc/bashrc文件配置環(huán)境變量:vi/etc/bashrc在文件最后加入:exportJAVA_HOME=/us叨ava/jdk1.8.0_151exportPATH=$PATH:$JAVA_HOME/bin使修改立即生效source/etc/bashrc查看JAVA_HOME值echo$JAVAHOMEMysql安裝(主節(jié)點(diǎn))到官網(wǎng) HYPERLINK /downloads/file/?id=469456%e9%80%89%e6%8

35、b%a9%e5%af%b9%e5%ba%94%e5%ae%89%e8%a3%85%e5%8c%85%ef%bc%9a /downloads/file/?id=469456選擇對(duì)應(yīng)安裝包:下載安裝包#wget HYPERLINK /archives/mysql-5.7/mysql-5.7.18-1.el7.x86 /archives/mysql-5.7/mysql-5.7.18-1.el7.x8664.rpm-bundle.tar解壓安裝包#tar-xvfmysql-5.7.18-1.el7.x86_64.rpm-bundle.tar解壓后文件列表:mysql-community-embedde

36、d-devel-5.7.18-1.el7.x8664.rpmmysql-community-devel-5.7.18-1.el7.x86_64.rpmmysql-community-client-5.7.18-1.el7.x86_64.rpmmysql-community-common-5.7.18-1.el7.x86_64.rpmmysql-community-embedded-5.7.18-1.el7.x86_64.rpmmysql-community-embedded-compat-5.7.18-1.el7.x86_64.rpmmysql-community-libs-5.7.18-1.

37、el7.x86_64.rpmmysql-community-server-minimal-5.7.18-1.el7.x86_64.rpmmysql-community-test-5.7.18-1.el7.x86_64.rpmmysql-community-minimal-debuginfo-5.7.18-1.el7.x86_64.rpmmysql-community-libs-compat-5.7.18-1.el7.x8664.rpm3)按次序安裝按common-libs-client-server的順序安裝:#rpm-ivhmysql-community-common-5.7.18-1.el

38、7.x86_64.rpmrpm-ivhmysql-community-libs-5.7.18-1.el7.x86_64.rpmrpm-ivhmysql-community-client-5.7.18-1.el7.x86_64.rpmrpm-ivhmysql-community-server-5.7.18-1.el7.x86_64.rpmrpm-ivhmysql-community-devel-5.7.18-1.el7.x86_64.rpm安裝下面包,否則Hue安裝報(bào)連接錯(cuò)誤rpm-ivhmysql-community-libs-compat-5.7.18-1.el7.x8664.rpm啟動(dòng)數(shù)據(jù)

39、庫(kù)#systemctlstartmysqld查看狀態(tài):#systemctlstatusmysqld修改MySQL初始密碼1、先修改配置文件/etc/f令MySQL跳過登錄時(shí)的權(quán)限檢驗(yàn),在mysqld下加入一行:skip-grant-tables2、重啟MySQL#servicemysqldrestart3、免密碼登錄MySQL。#mysql4、mysql客戶端執(zhí)行如下命令,修改root密碼mysqlusemysql;mysqlUPDATEuserSETauthentication_string=password(your-password)WHEREhost=localhostANDuser=

40、root;mysqlselecthost,user,authentication_string,password_expiredfromuser;mysqlupdateusersetpassword_expired=Nwherepassword_expired=Y/密碼不過期mysqlupdateusersethost=%whereuser=rootandhost=localhost;/遠(yuǎn)程可訪問mysq卜flushprivileges;刷新mysq卜exit;/退出5、修改配置文件/etc/f刪除此前新增那一行skip-grant-tables,并重啟MySQL(這一步非常重要,不執(zhí)行可能導(dǎo)

41、致嚴(yán)重的安全問題)#servicemysqldrestart/重啟Mysql2.安裝CM傳包,解包在主節(jié)點(diǎn)上下載相關(guān)軟件包,這里將軟件包下載到/data/cdh/目錄下。#cd/data/cdh載MysqlJDBC包:#wget HYPERLINK /maven2/mysql/mysql-connector-java/5.1.43/mysql-connector-java-5.1.43.jar /maven2/mysql/mysql-connector-java/5.1.43/mysql-connector-java-5.1.43.jar載CM:#wget HYPERLINK http:/ar

42、chive-primary.cloudera.eom/cm5/cm/5/cloudera-manager-centos7-cm5.13.1 http:/archive-primary.cloudera.eom/cm5/cm/5/cloudera-manager-centos7-cm5.13.1x8664.tar.gz載CDH:wget HYPERLINK /cdh5/parcels/5.13.1/manifest.json /cdh5/parcels/5.13.1/manifest.jsonwget HYPERLINK /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh

43、5.13.1.p0.2-el7.parcel.sha1 /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1wget HYPERLINK /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel /cdh5/parcels/5.13.1/CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel將CM解壓到/opt/目錄:#tar-zxvfcloudera-manager-centos7-cm5.13.1_x86_64.tar.gz-C/o

44、pt/#ls/opt/clouderacm-.2.2.在主節(jié)點(diǎn)上:#mysql-h-uroot-p在主節(jié)點(diǎn)上:#mysql-h-uroot-p/加參數(shù)-h指定本機(jī)方式,否則可能不允許執(zhí)行g(shù)rantEnterpassword:Enterpassword:輸入數(shù)據(jù)庫(kù)密碼/在MariaDB(none)命令狀態(tài)輸入下面腳本:createdatabasehiveDEFAULTCHARSETutf8COLLATEutf8_general_ci;createdatabaseamonDEFAULTCHARSETutf8COLLATEutf8_general_ci;createdatabasehueDEFAUL

45、TCHARSETutf8COLLATEutf8generalci;createdatabasemonitorDEFAULTCHARSETutf8COLLATEutf8_general_ci;createdatabaseoozieDEFAULTCHARSETutf8COLLATEutf8_general_ci;grantallprivilegeson*.*torootlocalhostidentifiedbyrootwithgrantoption;grantallon*.*toroot%Identifiedbyroot;flushprivileges;exit;/復(fù)制MysqlJDBC包至I/o

46、pt/cm-5.13.1/share/cmf/lib/目錄cpmysql-connector-java-5.1.43-bin.jar/opt/cm-5.13.1/share/cmf/lib/初始化CM,執(zhí)行下面腳本/opt/cm-5.13.1/share/cmf/schema/scm_prepare_database.shmysqlcm-hnode168-uroot-proot-scm-hostnode168scmscmscm/如果出現(xiàn)下面錯(cuò)誤:java.sql.SQLException:Accessdeniedforuserrootlocalhost(usingpassword:YES)/解

47、決辦法:在/etc/hosts文件中,加上localhost.node168Qlocalhost.nodel68主節(jié)點(diǎn)/etc/hosts內(nèi)容:Qlocalhost.nodel68nodelGBnndel69nodel/anodelGBnndel69nodel/anodelZlnodelZZ2.3.創(chuàng)建用戶3.168172.16.S.169703.17172腳本/scm_prepare_database.sh執(zhí)行成功界面:冊(cè)門*ycc-5C/Mhwi-scM-p-tpare-JlJir-sbidt.sh寸訓(xùn)1g-hlwalfet-priwtkb-IwhIwaihM-tsc*JjiviKiiE-

48、/UBT/-0J.51VrihrirqcHnbneihhtIE-aun-sp-i,ic.-el-El-=ur3-u-iM-BarLuMirCM.jdfeC.OfIrF1_This1dtprAUfEAd.mtriSH-dr1vfiiFLlMS11.Lj.jK.ITIvAf.UtlAdHv*Hvl1EhftSF口MdHJIMiAlladingCMTEFUdf1virl*ar2317!0Ji26cft血EcsrabiIshselc1ciiddhaicsi8?rs*弊TTIwdw1?mimc席ihnflto沖皿?.S.*54.5-6.2S-$.?.fe-盧例認(rèn)“住何eelcc*wccJc啤1sin-T

49、aec:percwplUnceiiichtKUilrgjpplRjtlDnnac叩ml訃亡vtrRaceprger“1sj-efttoreedelttwe-已kpTIcJiiydlMbitssl塚seixTnegwmtarjervjccnflQurKlanfl1ainClidif1-5CSIrtimciiU54rEiecktlrqBiB_l5Lbln-cp,11簾皆已命jar:/wiryTwre/JiMfcar-Kle-ccnrwcTcr-Jarra.j*r.-aprycf-S!MJT1BAcw.clov(Jerj.3tficerprrtc/rIrajMra-ini-iH-viH-.-ptre

50、ixOEk-claudvra.mr.tfc.l1o-stBLKaql.idn.Drinr1.ThiiaihprKvtHdLUtanwdrinrl!maisum.Hnql.cj.Idbc.Driw*.ThatkH丫ariaiMJCwitiCiallyrK*l3itHrdirltha5P1ndunu*lltudInQrfehdrIyirl2di7iOJi27tFTEgwntsrat-iIshfiq55L立申耳口:*孫川網(wǎng)汽s1-5門艸+血d.Me席聲訊to吟噸l5.5.*54.5-6.-S-.?.“鈾審“叫毗,s=slcffl*wcch睥Isftact:rqrcwll-nce:i-ichtpJrd

51、叩購(gòu)ei1*1叫$5il訃弋strIcace呼也刖即1j.j-rtioTaImi1crwe亡叩TlcJiiydli-itiel沖,口x曲伽亠eEEdrtrr-cw-i:itl-EJEicuH-iTloftian.3Q1-I-43-331T=U2:JTaXL4win3NF10ejm.twtiflrj_ntHr|3Eljh.ifcuEiT.MfsZuntfidCA-icuEar-LKMufiLllyuomKt*cdeIjeJhu-Alldam.schiwijesq1s口時(shí)訶討“i|r-Mi::4ti4ccih5iJ_5-yri:*|在所有節(jié)點(diǎn)上執(zhí)行:#useradd-system-home=/op

52、t/cm-5.13.1/run/cloudera-scm-server-shell二/bin/false-commentClouderaSCMUsercloudera-scm2.4.制作本地YUM源在主節(jié)點(diǎn)上:進(jìn)入軟件包目錄#cd/data/cdh/拷貝三個(gè)文件至U/opt/cloudera/parcel-repo/目錄#cpCDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcelCDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1manifest.json/opt/cloudera/parcel-repo/進(jìn)入/opt/cloudera/

53、parcel-repo/目錄#cd/opt/cloudera/parcel-repo/修改文件名#mvCDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha此時(shí)/opt/cloudera/parcel-repo/目錄下文件:root&nodel68parcel-repo#112717:34CDH-5.13.1-1.cdh5.13.1.pO.2-el7.parcel272717:34CDH-5.13.1-1.cdh5.13.1.pO.2-el7.parcel2717:34CDH-5

54、.13.1-1.cdh5.13.1.pG.2-el7.parcel.sha2717:34manifest,json-rw-r-r一一Lrootroot1534231261Mar-rw-r-r-1rootrocrt41Mar-rw-r-r-Lrootrocrt73766Marroot(&nodel68parcel-repo#.25拷貝jar包在所有節(jié)點(diǎn)上:/如果沒有/usr/share/java/目錄,則創(chuàng)建cpmysql-connector-java-5.1.43-bin.jar/usr/share/java/mysql-connector-java.jar在主節(jié)點(diǎn)上:/將mysqlJDBCj

55、ar包拷貝到/opt/cm-5.13.1/share/cmf/lib/目錄cpmysql-connector-java-5.1.43-bin.jar/opt/cm-5.13.1/share/cmf/lib/修改cloudera-scm-agent配置在主節(jié)點(diǎn)上,修改/opt/cm-5.13.1/etc/cloudera-scm-agent/config.ini文件:/將config.iniserver_host=localhost內(nèi)容改為server_host=68#sed-is/server_host=localhost/server_host=68/opt/cm-5.13.1/etc/cl

56、oudera-scm-agent/config.ini在主節(jié)點(diǎn)上:/將cm-5.13.1打包,并復(fù)制到其他節(jié)點(diǎn)#cd/opttarczfcm-5.13.1.tar.gzcm-5.13.1/復(fù)制到其他節(jié)點(diǎn)scpcm-5.13.1.tar.gznode169:/opt/scpcm-5.13.1.tar.gznode170:/opt/scpcm-5.13.1.tar.gznode171:/opt/scpcm-5.13.1.tar.gznode172:/opt/在所有從節(jié)點(diǎn)上解壓:/將cm-5.13.1包解壓#cdopttar-xzvfcm-5.13.1.tar.gz解壓后刪除#rm-rfcm-5.1

57、3.1.tar.gz啟動(dòng)CMServer和Agent在主節(jié)點(diǎn)上,啟動(dòng)cloudera-scm-server:#/opt/cm-5.13.1/etc/init.d/cloudera-scm-serverstart啟動(dòng)過程較慢,可通過/opt/cm-5.13.1/log/cloudera-scm-server日志,查看啟動(dòng)過程。在所有節(jié)點(diǎn)上,啟動(dòng)cloudera-scm-agent:#/opt/cm-5.13.1/etc/init.d/cloudera-scm-agentstart訪問CM地址:http:/主節(jié)點(diǎn)IP:7180用戶名、密碼:adminclouderamanage社區(qū)瞬世圧助彥安裝C

58、DH登錄后界面接受協(xié)議:?ImMnA%-8aeraimw澤啟毎円ckllKlerwTHnagefrlzrucbrHiTdQSB35sumx-DLoiLiRH嵩WHS咅尋*trrt_3aHQX93QXH3s4eEnAF*HA3srflU25_-33Hen_-w5口EPFBaE-9M.sa3-rlLGUDElu,_srfKSl._-PIMrns吉KSFITnMGAREnuY-J8?d5os3f-sUSE4$*MJTSS8stt罷皐EHm5,3fTHATWVAfiTHEnio-Hso-rtSUCHcaK.?JHEE2HrTlHEMHmgrouImfhe若m7總良弔tr耳錄he番PSEanisi?3*

59、WJICCrnp&HmgrrlgT_./WEF$HETOM_.g匚K-h國(guó)ytheEHA1F電厳azg圭-CSDCITE5sU5N&HVTCTNPRDDkTA3U吿JrIOHLEEKZ-_En$sEMID-RLL*Tiv-sx03-4口FTXQEFCrHcExTiHsst*3HSTBIS占rehjth3-E勒EEToeELEapLYKU*盟芒-AFTHrrlTrrl聖小IB酉SSS3s$3xiTHS蚤BEMENT-FFDUsZ2IM-or3sssnDxsdnaMs3H.ss-iMATmlCHANY3S3s-sn-SRHhMK-e-a-aJsstn.4LT期宙山?A1S1mnjnSHlM-lwi

60、KtJy7TEWSE-4vri藥teB32sCMs屮s3EHLFrErKIr晏恥CDHOFLSsAhb-Fmslsffof&eNGF3它總OECasNmdEtorHiTruMtM-4VRloudwl-Fm=MQO.-F.tatrdMrpdttsH33ss隠境繚嗚COU帶懇s一-星就彈kygumT2U.X1I掘aLj-ffleailtaFaw界BlyTi雷f=直-PS39.XD_-舀%監(jiān)皐-C復(fù)J-k43#=hawdoKmjwVRXao0&n亠*PWTHIWHu?f3J=fi日)*isjnnrart-ql3-5Kff帝囿3MKJirFgtk冃Gl當(dāng)Q-o星UMW立曜3sfl-W13!wmdOH4

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論