第一步:安裝 scons
OpenNebula 需要使用scons這個軟件來生成Makefile文件,並自動編譯, 首先必須確認系統已經安裝scons。
如果沒有安裝, 請自行安裝。 最簡單的辦法是使用命令 yum install scons 或者 apt-get install scons
如果這兩個自動化的方法都不行, 那自己下載 scons, 我下載的是 scons-2.1.0.tar.gz
免費下載地址在 http://linux.linuxidc.com/
用戶名與密碼都是www.linuxidc.com
具體下載目錄在 /2012年資料/3月/14日/在紅帽RHEL5上安裝OpenNebula-2.0.1/
解壓後進入目錄裡面
- [root@localhost ~]# cd scons-2.1.0
-
- [root@localhost scons-2.1.0]# python setup.py install
安裝完成後, 進入到 OpenNebula-2.0.1目錄繼續。
第二步:執行scons進行編譯
- [root@localhost opennebula-2.0.1]# pwd
- /root/opennebula-2.0.1
- [root@localhost opennebula-2.0.1]# scons
- scons: Reading SConscript files ...
- Testing recipe: pkg-config
- Error calling pkg-config xmlrpc_server_abyss++ --static --libs
- Testing recipe: xmlrpc-c-config
- Error calling xmlrpc-c-config c++2 abyss-server --libs --cflags
- Testing recipe: mixed hardcoded libraries and xmlrpc-c-config (debian lenny)
- Error calling xmlrpc-c-config c++2 abyss-server --libs --cflags
- Testing recipe: hardcoded libraries for Mac OS X (installed using port)
- g++ .xmlrpc_test/xmlrpc_test.27c461.cc -o .xmlrpc_test/xmlrpc_test.27c461.cc.out -I/opt/local/include -L/opt/local/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwinit -lwwwapp -lwwwtelnet -lwwwhtml -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lz -lpthread -lxmlrpc_client++ -lxmlrpc_client -lxmlrpc++ -lxmlrpc -lxmlrpc_util -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_server_abyss++ -lxmlrpc_server++ -lxmlrpc_server_abyss -lxmlrpc_server -lxmlrpc_abyss 1>>.xmlrpc_test/xmlrpc_test.27c461.cc.log 2>&1
-
-
- Error searching for xmlrpc-c libraries. Please check this things:
-
- * You have installed development libraries for xmlrpc-c. One way to check
- this is calling xmlrpc-c-config that is provided with the development
- package.
- * Check that the version of xmlrpc-c is at least 1.06. You can do this also
- calling:
- $ xmlrpc-c-config --version
- * If all this requirements are already met please send log files located in
- .xmlrpc_test to the mailing list.
-
- TypeError: 'str' object is not callable:
- File "/root/opennebula-2.0.1/SConstruct", line 150:
- exit(-1)
提示出錯信息 Error searching for xmlrpc-c libraries
解決辦法如下 :
- wget http://CentOS.karan.org/el5/extras/testing/SRPMS/xmlrpc-c-1.06.18-1.el5.kb.src.rpm
- rpmbuild --rebuild xmlrpc-c-1.06.18-1.el5.kb.src.rpm
- cd /usr/src/RedHat/RPMS/i386/
- rpm -i xmlrpc-c-1.06.18-1.x86_64.rpm
- rpm -i xmlrpc-c-devel-1.06.18-1.x86_64.rpm
安裝完畢後, 再回到 OpenNebula-2.0.1目錄 繼續執行第二步即可。
第三步:安裝 OpenNebula,並配置
- <pre name="code" class="plain">[root@localhost opennebula-2.0.1]# mkdir -p /srv/cloud/one/
- [root@localhost opennebula-2.0.1]# ./install.sh -d /srv/cloud/one/
- [root@localhost opennebula-2.0.1]# ls /srv/cloud/one/
- bin etc include lib share var
- # cd /root/
- # mkdir .one
- # cd .one/
- # echo "oneadmin:password" > one_auth
-
-
- <pre class="code"># vi /etc/one/oned.conf
- ...
- IM_MAD = [
- name = "im_xen",
- executable = "one_im_ssh",
- arguments = "xen" ]
-
- VM_MAD = [
- name = "vmm_xen",
- executable = "one_vmm_ssh",
- arguments = "xen",
- default = "vmm_ssh/vmm_ssh_xen.conf",
- type = "xen" ]
下來就可以啟動了。
- [root@localhost .one]# one start
- oned and scheduler started