puppet安裝配置手冊(cè)_第1頁(yè)
puppet安裝配置手冊(cè)_第2頁(yè)
puppet安裝配置手冊(cè)_第3頁(yè)
puppet安裝配置手冊(cè)_第4頁(yè)
puppet安裝配置手冊(cè)_第5頁(yè)
已閱讀5頁(yè),還剩24頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

系統(tǒng)管理安裝配置說(shuō)明Puppet的安裝配置以及集成說(shuō)明目錄系統(tǒng)管理安裝配置說(shuō)明1Puppet的安裝配置以及集成說(shuō)明10文檔說(shuō)明3文檔版本3文檔目的3文檔內(nèi)容3讀者對(duì)象3引用標(biāo)準(zhǔn)3縮寫(xiě)與術(shù)語(yǔ)對(duì)照表31安裝環(huán)境說(shuō)明42Puppet安裝、配置、運(yùn)行說(shuō)明5Puppet及依賴的軟件包的安裝。6操作系統(tǒng)自帶的的RPM包6第三方軟件包的安裝6Puppet的配置〔master,client〕9設(shè)置puppet用戶權(quán)限11Puppet核心功能運(yùn)行說(shuō)明12設(shè)置時(shí)間效勞器12PuppetMaster(dn4.cloud)運(yùn)行步驟12PuppetClient(dn0.cloud)運(yùn)行步驟153Puppet的擴(kuò)展以及跟第三方Report集成18Puppet擴(kuò)展Passenger18安裝操作系統(tǒng)自帶的的RPM包18安裝第三方軟件包的安裝19集成Passenger跟Apache20在apache中配置puppet應(yīng)用22重新啟動(dòng)apache24Puppet集成PuppetDashboard25安裝ruby相關(guān)的gem包25安裝PuppetDashboard相關(guān)的rpm包25關(guān)聯(lián)PuppetDashboard跟MYSQL27關(guān)聯(lián)PuppetDashboard和apache30關(guān)聯(lián)PuppetDashboard和Puppet31文檔說(shuō)明文檔版本版本號(hào)作者日期備注文檔目的 本文檔旨在對(duì)系統(tǒng)管理工具puppet軟件的安裝、擴(kuò)展以及具體應(yīng)用提供詳細(xì)、準(zhǔn)確的說(shuō)明。文檔內(nèi)容本文內(nèi)容包括puppet、puppetdashboard安裝、配置、擴(kuò)展的說(shuō)明;puppet配置文件的介紹。讀者對(duì)象本文檔面向的主要讀者對(duì)象為系統(tǒng)管理人員。引用標(biāo)準(zhǔn)Puppet在線文檔縮寫(xiě)與術(shù)語(yǔ)對(duì)照表術(shù)語(yǔ)和縮寫(xiě)解釋說(shuō)明Puppet系統(tǒng)管理軟件PuppetdashboardPuppet的WEB管理軟件安裝環(huán)境說(shuō)明。軟件基于root用戶安裝,所有除操作系統(tǒng)自帶的RPM包之外的安裝文件列示如下:.gem所有軟件包除yumrepository中存在的之外都放置于/home/puppet/puppet-software/中。所有的安裝命令除特別說(shuō)明之外均以/home/puppet/puppet-software/下的puppet或ruby子目錄為工作目錄。已經(jīng)將CentOS的ISO文件作為內(nèi)網(wǎng)的yumrepository所以,并且將非CentOS的rpm包放置到工作目錄下的puppet目錄。同時(shí)ruby跟rubygems相關(guān)的包放置到工作目錄下的ruby目錄。為了方便起見(jiàn)我們盡量使用yum跟gem作為包安裝管理工具。ruby跟rubygems的安裝請(qǐng)進(jìn)入/home/puppet/puppet-software/ruby有關(guān)yum跟gem的操作請(qǐng)進(jìn)入/home/puppet/puppet-software/puppet目錄,以兩臺(tái)機(jī)器作為模擬環(huán)境一臺(tái)安裝puppetmaster(dn4.cloud/172.16.200.104)以及相應(yīng)的擴(kuò)展,一臺(tái)安裝puppetclient(dn0.cloud/172.16.200.99)。其中puppetmaster需要安裝全文列出的軟件〔如果需要擴(kuò)展puppet〕。而puppetclient只需要安裝《Puppet安裝、配置說(shuō)明》局部。確認(rèn)兩臺(tái)機(jī)器都已經(jīng)正確配置以下文件Dns:/etc/hosts127.0.0.1dn0.cloudlocalhostdn0才可以使得hostname-f正確返回fqdn(佛山測(cè)試環(huán)境驗(yàn)證)Hostname:/etc/sysconfig/network域名:Puppet安裝、配置、運(yùn)行說(shuō)明Puppet的軟件需要安裝在系統(tǒng)管理主控節(jié)點(diǎn)Master以及所有受控節(jié)點(diǎn)Client上。Puppet及依賴的軟件包的安裝。請(qǐng)確認(rèn)這些軟件包都已經(jīng)正常安裝。gcc-c++opensslopenssl-develncursesncurses-develrubyfacter操作系統(tǒng)自帶的的RPM包gcc-c++,openssl,openssl-devel,ncurses,ncurses-devel的安裝略去不述。第三方軟件包的安裝ruby-1.8.7CentOS自帶的ruby1.8.5版本過(guò)低。因此使用ruby我們將ruby安裝到缺省目錄下【可能要更改后面有關(guān)ruby路徑的工作?!?安裝文件目錄/home/puppet/puppet-software/ruby解壓軟件包:[root@dn4ruby]#tar-zxvfru&&cd編譯安裝ruby到/usr目錄下:[root@dn4ruby-1.8.7-p334]#./configure&&make&&makeinstall驗(yàn)證ruby安裝[root@dn4ruby-1.8.7-p334]#ruby-vruby1.8.7(2023-02-18patchlevel334)[x86_64-linux]驗(yàn)證ruby標(biāo)準(zhǔn)庫(kù)安裝需要注明的是安裝ruby1.8.7以后需要確認(rèn)ruby的lib庫(kù)包含如下標(biāo)準(zhǔn)庫(kù)〔base64,cgi,digest/md5,etc,fileutils,ipaddr,openssl,strscan,syslog,uri,webrick,webrick/s,xmlrpc.〕??梢酝ㄟ^(guò)ruby-e'puts$:'命令顯示ruby的lib搜索路徑,〔也可以通過(guò)-RUBYLIB的環(huán)境變量來(lái)設(shè)定ruby的庫(kù)路徑〕然后在類(lèi)搜索路徑中確認(rèn)如下ruby類(lèi)均存在。如etc的lib。[root@dn4puppet]#find/usr/local-nameetc*|grepruby能找到文件.4的安裝文件目錄在/home/puppet/puppet-software/ruby有關(guān)gem版本的問(wèn)題。目前puppet要求gem的版本在1.3.4以下。解壓安軟件包:[root@dn4ruby]#安裝rubygems[root@dn4rubygems-1.3.4]安裝驗(yàn)證[root@dn4rubygems-1.3.4]#gem-vFacterFacter安裝文件目錄/home/puppet/puppet-software/puppet安裝facter[root@dn4puppet]#geminstallfacter-1.5.8.gem1geminstalledInstallingridocumentationforfacter-1.5.8...InstallingRDocdocumentationforfacter-1.5.8...【因?yàn)間em版本問(wèn)題同時(shí)會(huì)出現(xiàn)以下提示CouldnotfindmainpageREADMECouldnotfindmainpageREADMECouldnotfindmainpageREADMECouldnotfindmainpageREADME】安裝驗(yàn)證[root@dn4puppet]#facter-v.8PuppetPuppet安裝文件目錄/home/puppet/puppet-software/puppet安裝puppet[root@dn4puppet]#geminstall.gemSuccessfullyinstalled1geminstalledInstallingridocumentationfor...安裝驗(yàn)證〔打印所有的配置項(xiàng)〕[root@dn4puppet]#puppetmaster--configprintall……….Puppet的配置〔master,client〕默認(rèn)配置文件為/etc/puppet/,以工作目錄中的conf/puppet-master/文件夾中的為藍(lán)本進(jìn)行修改。其中紅色局部需要根據(jù)情況進(jìn)行替換。被注釋掉的局部〔綠色〕需要在安裝puppet-dashboard以后再去掉注釋。該配置文件針對(duì)主控節(jié)點(diǎn)[root@dn4puppet]#mkdirpuppet&&cp/home/puppet/puppet-software/conf/puppet-master/puppet.conf/etc/puppet/文件內(nèi)容如下,其包含三局部:其中main+master構(gòu)成主控節(jié)點(diǎn)配置文件,main+agent構(gòu)成受控節(jié)點(diǎn)配置文件。main+master+agent構(gòu)成同一節(jié)點(diǎn)具備主控被控兩種角色時(shí)的配置文件。master的配置文件模板。client的皮遏制文件模板/home/puppet/puppet-software/conf/puppet-client[main]vardir=/var/opt/lib/puppetlogdir=/var/log/puppetrundir=/var/run/puppetmodulepath=/etc/puppet/modules[master]#reports=,store#reportsurl=://dn4.cloud:3000/reports/ssl_client_header=SSL_CLIENT_S_DNssl_client_verify_header=SSL_CLIENT_VERIFYssldir=/etc/puppet/ssl#node_terminus=exec#external_nodes=/usr/share/puppet-dashboard/bin/external_nodestoreconfigs=false[agent]certname=dn4.cloudlocalconfig=$vardir/localconfiggraph=true#listen=trueignorecache=falseuse_cached_catalog=falseusecacheonfailure=false#report=true設(shè)置puppet用戶權(quán)限(效勞器端)創(chuàng)立用戶組puppet程序默認(rèn)使用用戶:puppet(group:puppet,user:puppet)來(lái)運(yùn)行程序。手工創(chuàng)立puppet用戶組及用戶。也可以創(chuàng)立(/var/opt/lib/puppet/var/log/puppet/var/run/puppet/etc/puppet/modules)用戶組授權(quán)創(chuàng)立上文中提到目錄并設(shè)置puppet權(quán)限[root@dn4puppet]#mkdir-p/var/opt/lib/puppet/var/log/puppet/var/run/puppet/etc/puppet/modules[root@dn4puppet]#chown-hRpuppet:puppet/var/opt/lib/puppet/var/log/puppet/var/run/puppet/etc/puppetPuppet核心功能運(yùn)行說(shuō)明在完成第二局部《Puppet安裝配置說(shuō)明》之后,我們已經(jīng)可以測(cè)試最核心的puppet的功能了。所有操作如無(wú)特別說(shuō)明均以root用戶運(yùn)行。該局部是構(gòu)建最根本最核心的puppet運(yùn)行環(huán)境。設(shè)置時(shí)間效勞器Puppet的master跟client之間使用openssl通信,為防止因?yàn)闀r(shí)間不同步導(dǎo)致SSL證書(shū)無(wú)法使用的情況。我們需要選擇一臺(tái)機(jī)器〔dn0〕作為時(shí)間效勞器。有關(guān)時(shí)間效勞器的配置此處略過(guò)。PuppetMaster(dn4.cloud)運(yùn)行步驟同步系統(tǒng)時(shí)間執(zhí)行crontab設(shè)定定時(shí)任務(wù)[root@dn4~]#crontab–e輸入以下時(shí)間同步腳本后保存退出:驗(yàn)證時(shí)間同步程序[root@dn4~]#tail-f/v26May16:55:01ntpdate[12700]:adjusttimeserver172.16.200.99offset0.023917sec….刪除系統(tǒng)安裝后的原始的openssl證書(shū)進(jìn)入/etc/puppet目錄刪除原始證書(shū)[root@dn4~]#cd/etc/puppet/&&rm-f-rssl,無(wú)目錄的時(shí)候可創(chuàng)立該目錄[root@dn4~]#cdnodedefault{file{"/tmp/caotest.txt":content=>"I'mCaotestPUPPET"}}notice:/Stage[main]//Node[default]/File[/tmp/caotest.txt]/ensure:definedcontentas'{md5}366e5662f290439eef7b150b2b0228d1'notice:Finishedcatalogrunin0.01seconds啟動(dòng)puppetmaster調(diào)試模式啟動(dòng)[root@dn4puppet-software]#puppetmaster--no-daemonize-ddebug:Failedtoloadlibrary'selinux'forfeature'selinux'debug:Failedtoloadlibrary'shadow'forfeature'libshadow'debug:Puppet::Type::User::ProviderDirectoryservice:file/usr/bin/dscldoesnotexistdebug:Puppet::Type::User::ProviderPw:filepwdoesnotexistdebug:Failedtoloadlibrary'ldap'forfeature'ldap'………….正常模式啟動(dòng)[root@dn4puppet-software]#puppetmaster啟動(dòng)驗(yàn)證[root@dn4puppet-software]#ps-ef|greppuppetpuppet92281018:56?00:00:00/usr/local/bin/ruby/usr/bin/puppetmasterroot92334349018:57pts/100:00:00greppuppet配置puppet為UsingStoredConfigurations安裝rails〔〕gem[root@dn4puppet]#geminstall-frails-2.3.14.gem45gemsinstalled安裝mysql的rpm包〔mysql,mysql-devel,mysql-server〕如果StoredConfigurations存儲(chǔ)的數(shù)據(jù)庫(kù)在不同機(jī)器上,可以不安裝mysql-server.安裝ruby-mysql的rpm包.參考《Puppet集成PuppetDashboard》中的mysql安裝安裝mysql的gem包參考《Puppet集成PuppetDashboard》中的mysql安裝創(chuàng)立對(duì)應(yīng)的mysql數(shù)據(jù)庫(kù)數(shù)據(jù)庫(kù)名:puppet用戶名/密碼:puppet/puppet參考《Puppet集成PuppetDashboard》中的mysql在[master]段下增加以下內(nèi)容storeconfigs=truedbadapter=mysqldbname=puppetdbpassword=puppetdbuser=puppetdbport=3333重啟puppet效勞如擴(kuò)展了passenger那么只需要重啟d效勞PuppetClient(dn0.cloud)運(yùn)行步驟同步系統(tǒng)時(shí)間略刪除系統(tǒng)安裝后的原始的openssl證書(shū)進(jìn)入/etc/puppet目錄刪除原始證書(shū)ssl目錄[root@dn0~]#cd/etc/puppet/&&rm-f-rssl請(qǐng)求效勞器puppetmaster簽名client端證書(shū)確認(rèn)該客戶端dn0的證書(shū)在效勞器dn4已經(jīng)刪除確認(rèn)該客戶端dn0的證書(shū)在本機(jī)已經(jīng)刪除/etc/puppet/ssl/*.*在客戶端dn0上執(zhí)行如下申請(qǐng)證書(shū)簽名命令[root@dn0puppet]#puppetagent--waitforcert5--testinfo:CreatinganewSSLkeywarning:peercertificatewon'tbeverifiedinthisSSLsessioninfo:Cachingcertificateforcawarning:peercertificatewon'tbeverifiedinthisSSLsessionwarning:peercertificatewon'tbeverifiedinthisSSLsessioninfo:CertificateRequestfingerprint(md5):67:EF:AF:D9:0E:D9:76:6F:DC:2D:C3:E2:7C:56:75:FAwarning:peercertificatewon'tbeverifiedinthisSSLsession在效勞器端dn4上執(zhí)行如下證書(shū)簽名命令[root@dn4puppet-software]#puppetcert--listnotice:RemovingfilePuppet::SSL::CertificateRequestdn0.cloudat'/etc/puppet/ssl/ca/requests/dn0.cloud.pem'請(qǐng)求效勞器的catalog,驗(yàn)證執(zhí)行情況在客戶端dn0申請(qǐng)證書(shū)簽名成功以后,會(huì)將效勞器dn4中的cataog下載到本地運(yùn)行。在這里我們演示下簽名成功以后的動(dòng)作。刪除上次catalog的結(jié)果,為了保證每次都創(chuàng)立該文件,我們可以在每次運(yùn)行client之前刪除該文件。[root@dn0puppet]#rm-f測(cè)試模式運(yùn)行puppetagent[root@dn0puppet]#puppetagent--testinfo:Applyingconfigurationversion'1306411479'notice:/Stage[main]//Node[default]/File[/tmp/caotest.txt]/ensure:definedcontentas'{md5}366e5662f290439eef7b150b2b0228d1'notice:Finishedcatalogrunin0.07seconds設(shè)置失敗時(shí)不使用cachedcatalogPuppetclient從master獲取到catalog執(zhí)行成功以后會(huì)緩存在本地,當(dāng)新的catalog獲取后執(zhí)行失敗就會(huì)默認(rèn)使用緩存的上一次的成功的catalog。這種情況下會(huì)導(dǎo)致puppetdashboard上的顯示存在狀態(tài)跟LOG不一致的情況:狀態(tài)顯示成功(因?yàn)樽詈髨?zhí)行了上次緩存的catalog),而LOG顯示有ERROR。因此建議將puppetclient設(shè)置為失敗時(shí)不使用緩存的catalog。[agent]usecacheonfailure=false配置接收master的kick命令當(dāng)希望puppetclien可以響應(yīng)master的puppetkick命令時(shí)配置如下,puppetkick命令如:……[agent]listen=true增加授權(quán)文件增加,配置文件,可以拷貝/home/puppet/puppet-software/conf/puppet-client/中的文件。相關(guān)的配置項(xiàng):path/authyesallow*:[fileserver]allow*.*[puppetmaster]allow*.*[pelementserver]allow*.*[puppetrunner]allow*.*[puppetbucket]allow*.*[puppetreports]allow*.*重新啟動(dòng)puppetagent最終運(yùn)行狀態(tài)一次性啟動(dòng)puppetagent設(shè)置定時(shí)任務(wù)puppetclient正常運(yùn)行一次以后將會(huì)在root用戶下創(chuàng)立定時(shí)任務(wù):*/2****/home/cloud/platform/tools/puppet/puppet-client.sh>/dev/null2>&1Puppet的擴(kuò)展以及跟第三方Report集成Puppet擴(kuò)展Passengerpuppet內(nèi)嵌了WEBrick的效勞器,該效勞器性能有限,puppet提供兩種擴(kuò)展方式:Passenger,Mongel,其中Passenger只被puppet以及后繼版本支持,在此之前的puppet版本可以選擇Mongel進(jìn)行擴(kuò)展。Passenger(AKAmod_railsormod_rack)是Apache2.x的擴(kuò)展,他使得Apache效勞器上可以運(yùn)行Rack跟Rails應(yīng)用。在puppet(>0.24.6)中附帶了一個(gè)Rack應(yīng)用,該應(yīng)用內(nèi)嵌了puppetmaster的功能。也就是說(shuō)我們可以讓該Rack應(yīng)用運(yùn)行在擴(kuò)展了Passenger的Apache效勞器上就可以獲得運(yùn)行puppetmaster同樣的效果。以后啟動(dòng)Apache以后就可以自動(dòng)成為master節(jié)點(diǎn)。注意:擴(kuò)展passenger的時(shí)候必須保證已經(jīng)至少運(yùn)行了一次puppetmaster生成了效勞器證書(shū)。軟件的版本以安裝包中文件為準(zhǔn)??梢詤⒖紁uppet的解壓包中文檔/ext/rack/README,具體的安裝步驟也可以參考之。Passenger依賴的軟件包包括(d,d-devel,mod_ssl,ruby,ruby-devel,Rubygems,rack,rake,fastthread,passenger)其中有關(guān)ruby的局部在上面的操作中已經(jīng)安裝。安裝操作系統(tǒng)自帶的的RPM包d,d-devel,mod_ssl以及他們依賴包的安裝略去不述。安裝第三方軟件包的安裝安裝文件目錄在/home/puppet/puppet-software/puppet。全部以gem方式安裝。因?yàn)橐蕾嚨膅em已經(jīng)都齊全。可以直接安裝passenger,讓gem解決依賴關(guān)系。安裝passenger[root@dn4puppet]#geminstallpassenger-2.2.11.gemBuildingnativeextensions.Thiscouldtakeawhile...Buildingnativeextensions.Thiscouldtakeawhile...4gemsinstalled………..安裝驗(yàn)證[root@dn4puppet]#passenger-config--version集成Passenger跟Apache運(yùn)行Passenger自帶集成命令安裝passenger模塊到apache[root@dn4puppet]#passenger-install-apache2-moduleWelcometothePhusionPassengerApache2moduleinstaller,v2.2.11.………….PressEntertocontinue,orCtrl-Ctoabort.選擇Enter繼續(xù)安裝顯示如下:Checkingforrequiredsoftware...*GNUC++compiler...foundat/usr/bin/g++*Rubydevelopmentheaders...found*OpenSSLsupportforRuby...found*RubyGems...found*Rake...foundat/usr/bin/rake*rack...found*Apache2...foundat/usr/sbin/d*Apache2developmentheaders...foundat/usr/sbin/apxs*ApachePortableRuntime(APR)developmentheaders...foundat/usr/bin/apr-1-config*ApachePortableRuntimeUtility(APU)developmentheaders...foundat/usr/bin/apu-1-config……………TheApache2modulewassuccessfullyinstalled.PleaseedityourApacheconfigurationfile,andaddtheselines:LoadModulepassenger_module/usr/local/PassengerRoot/usr/local/PassengerRuby/usr/bin/ruby增加passenger模塊到apache配置文件可以按照上一步中的提示,在/etc/d/conf/d.conf增加passenger模塊。在這里我們選擇直接從安裝包中直接拷貝過(guò)去[root@dn4puppet]#cp/home/puppet/puppet-software/conf/d/conf/d.conf/etc/d/conf/在apache中配置puppet應(yīng)用為了讓puppet中的rack應(yīng)用在apache中運(yùn)行起來(lái),除了為apache增加passenger模塊之外。還需要在apache的conf.d目錄增加有關(guān)puppet的虛擬路徑說(shuō)明,passenger的參數(shù)配置,需要?jiǎng)?chuàng)立puppet應(yīng)用的物理路徑,增加有關(guān)選項(xiàng)。Apache中增加puppet配置文件增加puppet虛擬路徑以及passenger選項(xiàng)聲明文件從puppet的安裝目錄中拷貝配置文件(安裝包中也有該文件藍(lán)本)[root@dn4~]#cp/usr/local/修改中有關(guān)主機(jī)名的選項(xiàng)修改中有關(guān)passenger的選項(xiàng)這局部選項(xiàng)建議可以創(chuàng)立一個(gè)新的配置文件獨(dú)立出來(lái)比方。#youprobablywanttotunethesesettingsPassengerHighPerformanceonPassengerMaxPoolSize12PassengerPoolIdleTime1500#PassengerMaxRequests1000PassengerStatThrottleRate120RackAutoDetectOnRailsAutoDetectOn安裝puppet的rack應(yīng)用[root@dn4~]#mkdir-p/etc/puppet/rack/public/[root@dn4~]#cp/usr/local//ext/rack/files/config.ru/etc/puppet/rack重新啟動(dòng)apache重新啟動(dòng)apache略去不述。至此puppet已經(jīng)成功擴(kuò)展了passenger模塊??梢源_認(rèn)已經(jīng)kill掉puppetmaster應(yīng)用并且apache已經(jīng)正常啟動(dòng)并開(kāi)始監(jiān)控8140端口后。通過(guò)前面提到的客戶端驗(yàn)證步驟驗(yàn)證安裝是否成功?!驹L問(wèn)8140端口,瀏覽器提示Theenvironmentmustbepurelyalphanumeric,not''】Puppet集成PuppetDashboardPuppetDashboard作為第三方的Report工具。跟puppet集成用來(lái)顯示puppet的client每次執(zhí)行更新的結(jié)果。PuppetDashboard安裝需要使用yum跟gem來(lái)管理包依賴關(guān)系。PuppetDashboard依賴的rpm包包括:ruby-mysql,ruby,rubygem-rake,rubygems。因?yàn)槲覀冊(cè)谇懊姘惭bruby跟rubygems都不是使用rpm方式安裝的,所以在這里我們只要安裝使用yum安裝ruby-mysql包然后再使用rpm強(qiáng)制安裝puppet-dashboard包就可以了。安裝ruby相關(guān)的gem包Mysql安裝mysql的gem包[root@dn4puppet]#geminstallmysql-2.8.1.gem或者geminstallmysql-2.8.1.gem----with-opt-dir=%mysql_home%Buildingnativeextensions.Thiscouldtakeawhile...1geminstalledInstallingridocumentationformysql-2.8.1...安裝PuppetDashboard相關(guān)的rpm包Ruby-mysql安裝ruby-mysql的rpm包[root@dn4puppet]#yum-yinstallruby-mysql-2.7.3-1.el5.x86_64.rpmLoadedplugins:fastestmirrorLoadingmirrorspeedsfromcachedhostfileSettingupInstallProcessParsingpackageinstallarguments…..puppet-dashboard強(qiáng)制安裝puppet-dashboard包[root@dn4puppet]#rpm-ivh--nodepspuppet-dashboard-1.1.0-1.noarch.rpmwarning:puppet-dashboard-1.1.0-1.noarch.rpm:HeaderV3RSA/SHA1signature:NOKEY,keyID4bd6ec30Preparing...###########################################[100%]1:puppet-dashboard###########################################[100%]驗(yàn)證puppet-dashboard安裝[root@dn4puppet]#servicepuppet-dashboardstatusPuppetDashboardisstopped此時(shí)puppet-dashboard還不能啟動(dòng),因?yàn)楹笈_(tái)數(shù)據(jù)庫(kù)尚未設(shè)置。關(guān)聯(lián)PuppetDashboard跟MYSQL假設(shè)mysql效勞器已經(jīng)啟動(dòng),使用root用戶進(jìn)行數(shù)據(jù)庫(kù)操作,root用戶密碼為123。使用的默認(rèn)的myf作為mysql配置文件。監(jiān)聽(tīng)端口選擇3311.創(chuàng)立PuppetDashboard的后臺(tái)數(shù)據(jù)庫(kù)登錄數(shù)據(jù)庫(kù)執(zhí)行[root@dn4~]#mysql--defaults-file=/etc/myf-uroot-p123執(zhí)行建庫(kù)語(yǔ)句CREATEDATABASEdashboardCHARACTERSETutf8;CREATEUSER'dashboard'@'localhost'IDENTIFIEDBY'dashboard';CREATEUSER'dashboard'@''IDENTIFIEDBY'dashboard';GRANTALLPRIVILEGESONdashboard.*TO'dashboard'@'localhost';GRANTALLPRIVILEGESONdashboard.*TO'dashboard'@'';flushprivileges;更改PuppetDashboard的配置文件更改數(shù)據(jù)庫(kù)配置文件數(shù)據(jù)庫(kù)配置文件位于根據(jù)具體的mysql數(shù)據(jù)庫(kù)設(shè)置內(nèi)容如下:production:database:dashboardusername:dashboardpassword:dashboardadapter:mysqlhost:port:3311encoding:utf8development:database:dashboardusername:dashboardpassword:dashboardadapter:mysqlhost:port:3311encoding:utf8test:database:dashboardusername:dashboardpassword:dashboardadapter:mysqlhost:port:3311encoding:utf8文件路徑:/usr/share/puppet-dashboard/config/拷貝為;修改其中的time_zone選項(xiàng)為效勞器的locale(raketime:zones:local可以獲取locale)。移植puppetdashboard數(shù)據(jù)庫(kù)進(jìn)入puppetdashboard的目錄[root@dn4~]#cd/usr/share/puppet-dashboard執(zhí)行rake任務(wù)(確認(rèn)目錄下存在Rakefile)[root@dn4puppet-dashboard]#rakeRAILS_ENV=productiondb:migrate關(guān)聯(lián)PuppetDashboard和apacheApache中增加puppetdashboard配置文件增加puppetdashboard虛擬路徑聲明文件從安裝文件夾中拷貝藍(lán)本至apache配置文件目錄修改中有關(guān)選項(xiàng)如puppetdashboard是默認(rèn)安裝的就無(wú)需更改該文件。重新啟動(dòng)apache重新啟動(dòng)apache。確認(rèn)puppetdashboard正常啟動(dòng)[root@dn4~]#servicedrestartStoppingd:[OK]Startingd:[OK][root@dn4~]#netstat-pan|grepdtcp00:::8140:::*LISTEN12982/dtcp00:::80:::*LISTEN12982/dtcp00:::3000:::*

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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)論