cenos上安裝eucalyptus完整教程及問題解決_第1頁
cenos上安裝eucalyptus完整教程及問題解決_第2頁
cenos上安裝eucalyptus完整教程及問題解決_第3頁
cenos上安裝eucalyptus完整教程及問題解決_第4頁
cenos上安裝eucalyptus完整教程及問題解決_第5頁
已閱讀5頁,還剩7頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、centos上eucalyptus源代碼安裝和問題解決說明文檔此文檔結(jié)合eucalyptus官方網(wǎng)站說明,及在安裝過程出現(xiàn)的問題解決方案,整理出一份完 整的安裝文檔,供大家在源代碼安裝eucalyptus時(shí)參考。文檔說明思路如下:先說明在cc機(jī)器上的安裝第一:在安裝前的準(zhǔn)備工作:1、xen安裝:一般linux在安裝時(shí)讓用戶選擇安裝程序中有xen相關(guān),選擇即可。測試xen安裝是否正常:命令:xm list結(jié)果:name id mem(mib) vcpus state time(s)domain-0 017211 r-1如果測試不止確的話,需要重新卸載xen后重新安裝xen,這個(gè)可參考網(wǎng)上xen安

2、 裝文檔2、測試dh卬服務(wù)器運(yùn)行狀態(tài)命令:service dhcp status3、yum安裝,在運(yùn)彳亍命令yum install gcc等時(shí)會出現(xiàn)問題如i、:could not retrieve mirrorlist /?release=5&arch=i386&repo=addons error waserrno 4 loerror: <urlopen error (-3, *xe5x9fx9fxe5x90x8dxe8xa7xa3xe6x9ex90xe6x9ax82xe6x97xb6xe5xa4xblxe8xb4xa

3、5*)>error: cannot find a valid baseurl for repo: addons關(guān)于此問題的解決參看網(wǎng)站 用4、安裝vblade包,官網(wǎng)有說明:for persistent dynamic block storage (aka ebs) to work, the front end w川 need to have the following software packages installed:a) lvm2 package (e.g., command lvm should work)b) aoetools package the aoe module

4、needs to be loaded on the front end as well as allnodes (modprobe aoe). if your kernel does not have ata-over-ethernet support, you will have to add thatc) vbladc package我必須先下載一個(gè)vblade的安裝包,然后查看安裝包中的readme文件,查看 如何安裝此包,安裝即可。第二步:安裝eucalyptus1、先安裝工具安裝包:yum install -y java-1.6.o-openjdk-devel ant ant-nod

5、eps libvirt-de vel curl-devel httpd httpd-devel apr-devel openssl-devel dhcp lib xml2 libxml2-devel gnutls gnutls-devel xen-devel libgcrypt-devel zlib-devel perl-convert-asnl perl-crpt-openssl-rsa perl-crypt-op enssl-random chkfontpath scsi-target-utils fuse-libs swig gcc2、參看官網(wǎng)安裝說明安裝(1) 先在root下建立一個(gè)目

6、錄來安裝eucalyptus: mkdir zyq先定義版本的環(huán)境變量:export version=2.0.2(2) 下載源代碼文件,將eucalyptus-2 0 2-src-of f line tar gz 和 eucalyptus-2 0 2-src-deps tar gz 上傳至創(chuàng)建的文件夾zyq,解壓源文件: cd /root/zyq tar zvxf eucalyptus一$version-src targz(3) 設(shè)定環(huán)境變量:命令運(yùn)行:pwdcd eucalyptus-$versionexport eucalyptus_src=、pwd、export eucalyptus=/

7、opt/eucalyptus(4) 安裝依賴包c(diǎn)d $eucalyptus_srctar zvxf /eucalyptus-$version-src-depstargzmkdir -p seucalyptus/packages/|安裝axis2cd $eucalyptus/packagestar zxvf seucalyptus_src/eucalyptus-src-deps/axis2-l 4 tgz安裝axis刀c: 先設(shè)定環(huán)境變量:export apache_includes=/usr/include/httpd/export apr_includes=/usr/include/apr-

8、1/ 安裝:export axis2c_home=$eucalyptus/packages/axis2c-l.6-0cd $eucalyptus_src/eucalyptus-src-deps/tar zvxf axis2c-src-l.6<0>tar.gzcd axis2c-src-l.6.0cflags=m-w" ./configure prefix=$axis2c_home with-apache2=$a?ache_includes 一一with-apr=$apr_includes 一一enable-multi-thread=nomake ; make instal

9、l安裝 rampart/cexport axis2c_home=$eucalyptus/packages/axis2c-l 6 0export ld_library_path=$axis2c_home/lib:$ld_library_pathcd $eucalyptus_src/eucalyptus-src-deps/tar zvxf rampartc-src-l 3.0-0eucal tar gzcd rampartc-src-1 3 0/configure -prefix=$axis2c_home 一一enable-static=no一一with-axis2=$axis2c_home/in

10、clude/axis2-1 6 0make ; make install安裝完畢后修改文件$axis2c_home/axis2.xml,vi $axis2c_home/axis2.xmlin the finflow1 section, change:-phase name=,securityn/ > to <phase name=msecuritym/>in the 'outflow' section, change:(5) 安裝 eucalyptus先確定java_home是否宦義,export java_home=n/usr/lib/jvm/java-op

11、enjak/export java=n$java_home/jre/bin/javan安裝 eucalyptus:cd $eucalyptus_src/configure -with-axis2=$eucalyptus/packages/axis2-l4-vzith-axis2c=$eucalyptus/packages/axis2c-l.60 -enable-debug -prefix=$eucalyptusmake ; make install(6) 部署 eucalyptus官網(wǎng)說明如下:rsync -a $eucalyptus/ rootnode-host-1:$eucalyptus/

12、rsync -a $eucalyptus/ rootnode-host-2:$eucalyptus/實(shí)現(xiàn)的功能是將/opt/eucalyptus下的內(nèi)容復(fù)制一份在nc節(jié)點(diǎn)上,只是單純的復(fù)制文件, 所以在nc必須安裝官網(wǎng)在安裝說明的那些包,我在這采用了將以上安裝的內(nèi)容在nc也安裝 一遍,但是如果有多個(gè)nc節(jié)點(diǎn)的話,這樣做會大大降低效率,但是必須保證nc節(jié)點(diǎn)的機(jī)器 符合之前的安裝需求。(7) 配置主機(jī)a. 添加用戶eucalyptususeradd eucalyptusb. 配置hypervisor,我們采用libvirt來管理xen虛擬化 測試:virsh list正確結(jié)果:id名稱狀態(tài)0 do

13、main-0running2 i-5691096d閑置錯(cuò)誤結(jié)果:錯(cuò)誤:連接到管理程序失敗 解決辦法就是修改配置文件,如下說明(xend-http-server yes)(xend-unix-server yes)(xend-unix-path /var/lib/xend/xend-socket)(xend-address localhost)(network-script network-bridge)(vif-script vif-bridge)(domo-min-mem 196)(domo-cpus 0)(vncpasswd 11) libvirt測試 libvirt:virsh list

14、修改libvirt配置文件:vi /etc/libvirt/libvirtd.conf#un ix_sock_group = “l(fā)ibvirt” => un ix_sock_group = 'libvirt1*#unix sock ro perms = ”0777" => unix sock ro perms = ”0777"#unix sock rw perms = ”0770” => unix sock rw perms = ”0770”修改完以后要重啟xendc. 酉己置network有四種網(wǎng)絡(luò)模式,我們采用的是system模式d. 配置 e

15、ucalyptus components在所有節(jié)點(diǎn)上運(yùn)行如下命令:$eucalyptus/usr/sbin/euca_conf -d $eucalyptus -hypervisor xen -inst ances /usr/1ocal/eucalyptus -user eucalyptus -setup功能說明:-d specifies the root of eucalyptus installation ($eucalyptus)hypervisor specifies the hypervisor ('xen* or 'kvm*)切記在這里必須選擇白己使用的虛擬 化技術(shù)i

16、nstances specifies where, on compute no des, instance files will be storeduser specifies the user that you created for running eucalyptussetup invokes the first-time setup taskse. distribution-specific post configuration steps (centos 安裝在這不需要修改,針對一些特殊的 linux系統(tǒng)需要修改)f. 配置啟動(dòng)腳本如果你想要在重啟系統(tǒng)讓cc、clouds nc自動(dòng)啟

17、動(dòng)的話,分別在cc和nc運(yùn)行相關(guān)命令:in -sf $eucalyptus/etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-cloudin -sf $eucalyptus/etc/init.d/eucalyptus-cc /etc/initd/eucalyptus-ccin -sf $eucalyptus/etc/init.d/eucalyptus-nc /etc/initd/eucalyptus-nc(8) 運(yùn)行 eucalyptuseucalyptus 的安裝包括五個(gè)部件:cloud controller (clc), walrus,

18、cluster controller (cc), storage controller (sc), and the node controller(s) (ncs).要將 clc、walrus> cc、sc 安裝在一 個(gè)機(jī)子上,nc安裝另外的機(jī)子上。確認(rèn)$eucalyptus/etc/eucalyptus/eucalyptus.conf配置是否正確,確定止確后執(zhí)行下面 的命令:$eucalyptus/usr/sbin/euca_conf -d $eucalyptus -setup$eucalyptus/usr/sbin/euca_conf -d $eucalyptus -enable c

19、loud -enable walrus -enable sc分別在cc和nc上啟動(dòng)eucalyptus:# start enabled front-end services$eucalyptus/etc/init.d/eucalyptus-cloud start# start the cluster controller$eucalyptus/etc/initd/eucalyptus-cc start分別在ncs上啟動(dòng):$eucalyptus/etc/init d/eucalyptus-nc start備注:如果要是修改了$eucalyptus/etc/eucalyptus/eucalyptu

20、s.conf 文件,必須重啟 clc 和 cc,而且cc必須用cleanrestart來重啟。安裝過程中中出現(xiàn)問題及解決:in 在執(zhí)行$eucalyptus/etc/init.d/eucalyptus-cloud start 出現(xiàn)如下結(jié)果: error: ebs is enabled and vblade is not found.原因:是因?yàn)樵诎惭b前沒有看安裝要求八for persistent dynamic block storage (aka ebs) to work, the front end will need to have the following software pack

21、ages installed:ivm2 package (e.g.z comma nd ivm should work)aoetools package the aoe module needs to be loaded on the front end as well as all no des (modprobe aoe). if your ker nel does not have ata-over-ether net support, you will have to add that.vblade package解決辦法:卜載一個(gè)vblade安裝包,安裝后再運(yùn)行$eucalyptus

22、/etc/init.d/eucalyptus-cloud start即可2、$eucalyptus/etc/init.d/eucalyptus-nc start 出現(xiàn)如下結(jié)果: eucalyptus not configred.原因:是因?yàn)樵诎惭b時(shí)沒有使用同步,所以nc的eucalyptus.conf文件中一些地方配置 不對,解決方案:需要對比cc上的配置文件然后進(jìn)行修改即可(切記修改以后一定要以clean方 式重啟cc和clc)第三步:配置eucalyptus1、first-time setup (2.0)(i) 需要注冊安裝好的部件,以使他們只能能夠通信:first, you will n

23、eed to register various front end components to do this, run the following commands on the front end.$eucalyptus/usr/sbin/euca_conf -register-walrus <front end ip address>$eucalyptus/usr/sbin/euca_conf 一register-cluster <clustername> <front end ip address>$eucalyptus/usr/sbin/euca_

24、conf register-sc <clustername> <front end ip address其中<front end ip address>修改cc的ip地址,可以自己命名clusternamefinally, you need to register nodes with the front end. to do so, ru n the following comma nd on the front end,$eucalyptus/usr/sbin/euca_conf 一一register-nodes n<node 0 ip address&

25、lt;noae 1 ip address> <node n ip address"其中node 0 ip address是指pic的地址,如果有多個(gè)nc,直接并列列出即口j(2) initial configuration在瀏覽器中輸入:https:/front-end-ip:8443第一次登錄用戶名和密碼都為admin,登錄后可以進(jìn)行一下操作:1 change the admin password,2. set the admin's email address, and3. confirm the ip of the cloud controller host

26、.詳細(xì)情況請參看官網(wǎng)說明備注:在修改完以后我們會看到credentials欄,想使用命令行工具必須從這里下載證書, download credentials;將下載的文件放在一目錄下,執(zhí)彳亍下面操作:mkdir $home/ eucaunzip euca2-admin-x50 9.zip 一d $home/ eucasource $home/.euca/eucarc在每次登錄機(jī)器后想使用命令行工具,必須都運(yùn)行命令:source $home/ . euca/eucarc2、hypervisor configuration在前面已經(jīng)介紹3、eucalyptus network configurat

27、ion前面簡單介紹,想了解eucalyptus網(wǎng)絡(luò)模式的詳細(xì)信息請參看官網(wǎng)說明4、ebs con figuration目前沒有涉及到第四步:管理eucalyptus在這之前修改先安裝 euca2ools, 進(jìn)行了說 明,安裝時(shí)最好直接使用安裝包安裝managing eucalyptus images (2.0)(詳細(xì)說明了上傳鏡像的過程)2、web-based management3、command-linebased management4、backup of eucalyptus (2.0)(暫時(shí)還沒有用到)第五步:troubleshoot eucalyptuscloud controll

28、er (clc), walrus, and storage controller (sc):cloud-debugogcloud-error.logcloud-output.logcluster controller (cc)cc.logaxis2coghttpd-cc_error_lognode controller (nc)nc.logaxis2coghttpd-nc error_logeuca_test_ ncog可以在相關(guān)log文件屮查詢錯(cuò)誤信息第六步:創(chuàng)建實(shí)例1、下載證書:將下載的證書放在.euca文件夾下,.euca可以放在root下,也可以放在root 的其他文件夾下mkdir

29、/.eucacd /eucaunzip name-of-the-key-zip.zipchmod 0700 /eucachmod 0600/.euca/*source -/.euca/euca2-*/eucarc2> creating keypairseuca-add-keypair mykey | tee mykeyprivatechmod 0600 mykey.private3、創(chuàng)建實(shí)例:euca-run-instances -k mykey -n <number of instances to start> <emi-id> (-t ml.large 之類選

30、擇虛擬機(jī)類型)在重新創(chuàng)建實(shí)例的時(shí)候需要査看可用資源euca describe availability-zones verbose察看可用的資源,如果free為0則這樣解決:1、修改、 eucalyptus . conf中max_cores為8注意修改以后需要.重新重啟這些服務(wù) 巫新開始創(chuàng)建實(shí)例。4、查看實(shí)例狀態(tài):euca-describe-instances5、登錄虛擬機(jī)euca-authorize 一p tcp -p 22 -s /0 defaultssh -i mykey private root<accessible-instance-ip><acces

31、sible-instance-ip>實(shí)例的 ip 地址止確顯示為:the authenticity of host 1 ip mht (ip illlht) 1 can't be established.rsa key fingerprint is bc:f0:34:9d:e9:e6:96:76:84:3d:0b:ac:28:9f:65:10.are you sure you want to continue connecting (yes/no)? yeswarning: permanently added 1 ip mhk1 (rsa) to the list of know

32、n hosts -bash-32#在這貞接輸入命令即叮創(chuàng)建實(shí)例過程中出現(xiàn)問題:1、創(chuàng)建實(shí)例后無法running原因:/usr/local/eucalyptus的權(quán)限為root,所以不能運(yùn)行,將所有者修改為eucalyptus 即可2、無法獲得ip地址:原因:dhcp的問題,需要在nc上配置dhcp,以使得生成實(shí)例能分配到ip地址有吋會出現(xiàn)前幾個(gè)能分配到ip地址,后面生成的實(shí)例無法分配到ip,是因?yàn)閕p的范圍 設(shè)定太少了,擴(kuò)大分配的ip地址范圍即可解決此問題3、雖然有ip地址,無法登錄虛擬機(jī),是因?yàn)橐恍?quán)限問題第一種錯(cuò)誤情況:ssh: connect to host ip 地川 port 22:

33、 connection timed out解決方法:之前一定要,euca-delete-keypair mykey 以及 mykey.private(1) 結(jié)束當(dāng)前實(shí)例(2) 重新下載證書(3) 對證書解壓,(4) 一定把證書權(quán)限改對(5) chmod 0700/root/.eucachmod 0600 /root/.euca/*(6) 重新生成mykey(7) 創(chuàng)建實(shí)例第二種錯(cuò)誤情況:the authenticity of host' ip 地址(p 地址)'can't be established.rsa key fingerprint is 54:69:a5:10:b&43:5b:c5:16:50:7&6f:09:16:c6:45.are you sure you want to continue connecting (yes/no)? yeswarning: permanently added ' ip 地(rsa) to the list of known hosts.enter passphrase for key 'mykey.private&#

溫馨提示

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

評論

0/150

提交評論