搭建雲端運算平台~Eucalyptus安裝日誌 centos 5.3

來源:互聯網
上載者:User

我只是記點流水帳,不是技術文檔。

1。首先找到文檔http://open.eucalyptus.com/wiki/EucalyptusPrerequisites_v1.5.2

看看安裝前需要準備什麼。

2。去http://open.eucalyptus.com/downloads

下載一個安裝包。我使用的是centos5.3

3.解壓縮後進入那個解壓的目錄。這步可以以後再做。

4。添加各種可能需要的包:

//為了和讓時鐘同步<br />yum install -y ntp<br />ntpdate pool.ntp.org<br />//安裝xen虛擬機器<br />yum install -y xen<br />sed --in-place 's/#(xend-http-server no)/(xend-http-server yes)/' /etc/xen/xend-config.sxp<br />sed --in-place 's/#(xend-address localhost)/(xend-address localhost)/' /etc/xen/xend-config.sxp<br />/etc/init.d/xend restart<br />//為了讓Eucalyptus正常運行<br />yum install -y java-1.6.0-openjdk ant ant-nodeps dhcp bridge-utils<br />

然後開放firewall的連接埠,輸入:system-config-securitylevel 我只是開放了連接埠8443, 8773, 8774 ,8775四個連接埠。傳說對於前端前三個連接埠是必須開的。對於Node來說8775是必須開的。但是Eucalyptus建議:最好把全部的防火牆都關了吧。可見這個項目僅僅是實現

了雲,但是對於雲的安全性尚沒有考慮。

5。這裡前端要安裝的命令如下:(這裡所說的前端是指和使用者打交道的一個PC,node可以看作是叢集中的一個節點),以下命令中的x86_64可以替換。我安裝時就使用的586. 安裝雲的命令中x86_64有的又變為i386.不過不管怎樣。似乎是把裡面的rpm包都安裝完即可。

//安裝第三方軟體<br />cd eucalyptus-1.5.2-rpm-deps-x86_64<br />rpm -Uvh aoetools-21-1.el4.x86_64.rpm /<br /> euca-axis2c-1.5.0-2.x86_64.rpm /<br /> euca-rampartc-1.2.0-1.x86_64.rpm /<br /> vblade-14-1mdv2008.1.x86_64.rpm<br />cd ..<br />//安裝雲<br />rpm -Uvh eucalyptus-1.5.2-1.x86_64.rpm /<br /> eucalyptus-cloud-1.5.2-1.x86_64.rpm /<br /> eucalyptus-gl-1.5.2-1.x86_64.rpm /<br /> eucalyptus-cc-1.5.2-1.x86_64.rpm<br />

6。Node要安裝的包

cd eucalyptus-1.5.2-rpm-deps-x86_64<br />rpm -Uvh aoetools-21-1.el4.x86_64.rpm /<br /> euca-axis2c-1.5.0-2.x86_64.rpm /<br /> euca-rampartc-1.2.0-1.x86_64.rpm /<br /> euca-libvirt-1.5-1.x86_64.rpm /<br /> vblade-14-1mdv2008.1.x86_64.rpm <br />

//安裝node controller<br />rpm -Uvh eucalyptus-1.5.2-1.x86_64.rpm /<br /> eucalyptus-gl-1.5.2-1.x86_64.rpm /<br /> eucalyptus-nc-1.5.2-1.x86_64.rpm<br />

7。我這裡為了方便。將node和front-end(前端)放在一個PC上。不知道是否可行,姑且一試。執行完第五步後,再回到

eucalyptus-1.5.2-rpm-deps-i586, 安裝 euca-libvirt-1.5-1.i386.rpm,然後再回上級目錄安裝eucalyptus-nc-1.5.2-1.i386.rpm

8. 然後根據指示輸入:su eucalyptus -c "virsh list" 果真fail to connect xend,但是沒有像傳說中的一樣,我這裡沒有顯示Domain -0.

9.暫時不管它,前端要執行

/etc/init.d/eucalyptus-cloud start<br />/etc/init.d/eucalyptus-cc start<br />

10. Node要執行:/etc/init.d/eucalyptus-nc start

11。對於我來說要在同一台PC上執行這三個操作。執行cloud時說You should have at least 32 loop devices。可以使用命令:ls -l /dev/loop* | wc -l 來查看你現在有幾個loop device.如果小於32,vim /etc/modprobe.conf(這裡不同的機器可能有所不同),增加一行:options loop max_loop=64,然後modprobe loop。再輸入ls-l /dev/loop* | wc -l 看看是否為64。

如果是64之後繼續敲命令。可能會在啟動nc的時候報出失敗:

You should have at least 32 loop devices
Starting Eucalyptus services: Node Controller cannot be started: errors in /opt/eucalyptus/var/log/eucalyptus/euca_test_nc.log

我查看了以下/opt/eucalyptus/var/log/eucalyptus/euca_test_nc.log這個檔案。有以下幾行。

 

libvir: Xen Daemon error : internal error failed to connect to xend
libvir: Xen Daemon error : unable to connect to 'localhost:8000': Connection refused
libvirt error: unable to connect to 'localhost:8000': Connection refused (code=38)

難道是8000連接埠沒有開?關閉防火牆和SELinux之後,再試。結果還是這個錯誤。莫非是有什麼軟體沒有裝?再試試這個命令:

yum install -y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel curl-devel /
 httpd httpd-devel apr-devel openssl-devel dhcp
結果還是不行。看來不是包沒有裝。再使用su eucalyptus -c "virsh list" 命令,得到的資訊為" libvir: 錯誤 : 操作失敗 :
xenProxyOpen錯誤: 串連到管理程式失敗。那可能是xend 服務沒有看。使用xend start結果拋出了異常。
(不能使用system-config-services來查看xend是否已經啟動。因為我查看過,結果為對勾,害我又查了很久。)如何開啟呢?
首先要重啟,grub會有新的一行出現(在重啟之前一定要先關閉SElinux,方法為system-config-securitylevel的第二個選項卡,
選擇禁止即可。否則進入Xen會等待很長時間。)。進入Xen之後。首先Xend start,然後可以使用xm list。這次你應該能看到
那個domain-0了吧。之後就使用eucalyptus的命令啟動即可。不過可能還會遇到loop device less than 32的警告。
再次更改 /etc/modprobe.conf檔案,加入 options loop max_loop=64 儲存後在命令列中輸入:modprobe loop即可。
再使用下面的命令:
eucalyptus-cloud start
eucalyptus-cc start
eucalyptus-nc start
cloud啟動時可能會有Is cloud alread start?的提示。如果不放心就使用eucalyptus-cloud restart好了。這次應該啥錯誤都沒有了!
安裝結束!(我只用了一台機器安裝雲...多台的暫時沒有嘗試。)

如果出現了以下的錯誤:

Restarting Eucalyptus cluster controller: (13)Permission denied: make_sock: could not bind to address [::]:8774
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8774
no listening sockets available, shutting down
Unable to open logs
Failed to start the CC!

那一定是system-config-security中,防火牆沒有置為disable或者seLinux沒有置為passivate或者disable導致的。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.