I’m a CentOS guy but a long time ago I started my Linux career with Debian. I’ve been asked to try to install OpenNebula 4.0.1 in Debian Wheezy so here is a post about what I’ve done.
Remember: I only want to try to help people, but I’m no Debian expert so I’m not responsible for direct or indirect damage caused by the use of the information on this site.
In general OpenNebula official packages works fine for Debian Wheezy, but there’s one package (opennebula_4.0.1-1_amd64.deb) that we’ll need to modify to avoid problems with dependencies. I’m going to execute all the commands as root and using a clean Debian minimal installation (only OpenSSH and utilies installed)
The first thing we’re going to do is to download and extract the OpenNebula source files from the official downloads page.
tar xvfz opennebula-4.0.1.tar.gz cd opennebula-4.0.1
We’ll need to compile the opennebula source files using the instructions found in the README.md file but first we’ll need a few packages.
aptitude -y install g++ ruby ruby-sqlite3 openssl libxmlrpc-core-c3-dev libsqlite3-dev libxmlrpc-c++4-dev scons flex bison libxml2-dev libssl-dev rake rubygems ruby-dev libmysqld-dev ruby-xmlparser libxslt1-dev libcurl4-openssl-dev
Now we are going to compile opennebula with mysql support. After the compilation we’re going to install the opennebula files in a temp directory called one_build:
scons mysql=yes mkdir ../one_build/ ./install.sh -d ../one_build/
Ok we’re done. Now let’s download the opennebula 4.0.1 packages for debian 6.0.7 from the opennebula.org download site and move them to a directory. Uncompress the files.
tar xvfz Debian-6.0.7-opennebula-4.0.1-1.tar.gz cd opennebula-4.0.1-1/
I’m a Debian newbie so I’ve decided to modify the existing deb package instead of building my own from scratch. I’ve used this useful forum post. We’ll use a temp directory called buildeb.
mkdir buildeb dpkg-deb -x opennebula_4.0.1-1_amd64.deb buildeb/ dpkg-deb --control opennebula_4.0.1-1_amd64.deb mv DEBIAN buildeb/ cd buildeb
Ok let’s modify the deb package.
Step 1, edit the DEBIAN/control file.
Change these dependencies:
- libssl0.9.8 (>= 0.9.8m-1) -> libssl1.0.0 (>= 1.0.1e-2)
- libmysqlclient16 (>= 5.1.21-1) -> libmysqlclient18 (>= 5.5.31)
- libxmlrpc-c3 -> libxmlrpc-core-c3 (>= 1.16.33-3.2)
Add this dependency after libxmlrpc-core-c3 (the comma is to separate dependencies :-D):
- , libxmlrpc-c++4 (>= 1.16.33-3.2)
Step 2, we are going to substitute some binaries from the .deb with those that we’ve just compiled so the right libraries are used.
# cp ../../one_build/bin/tty_expect usr/bin/ # cp ../../one_build/bin/oned usr/bin/ # cp ../../one_build/bin/one usr/bin/ # cp ../../one_build/bin/mm_sched usr/bin/ # cp ../../one_build/bin/onedb usr/bin/
OK now we’re ready to build our opennebula debian package for wheezy:
cd .. # dpkg -b buildeb opennebula_4.0.1-1_amd64_wheezy.deb
OK. All packages are ready but before installing them we are going to insall gdebi. It’ll help us to install the local deb files solving dependencies.
aptitude -y install gdebi
Come on, let’s install!
# gdebi opennebula-common_4.0.1-1_all.deb # gdebi ruby-opennebula_4.0.1-1_all.deb # gdebi opennebula-tools_4.0.1-1_all.deb # gdebi opennebula_4.0.1-1_amd64_wheezy.deb # gdebi opennebula-sunstone_4.0.1-1_all.deb
Now we’ll check if opennebula and sunstone are running:
service opennebula status [ ok ] one is running.grep netstat -ntap | grep 9869 tcp 0 0 127.0.0.1:9869 0.0.0.0:* LISTEN 22034/ruby
And finally let’s switch to user oneadmin and run a few commands:
$ onehost list ID NAME CLUSTER RVM ALLOCATED_CPU ALLOCATED_MEM STAT oneadmin@lestrade:/home/mcabrerizo/opennebula-4.0.1-1$ onevm list ID USER GROUP NAME STAT UCPU UMEM HOST TIME
Ok. The installation seems fine! but I’ll check in the next days if I missed something important. If all is good I’ll post here an URL to download the deb package I’ve bulit so you can save time (or write me an email if you can’t wait! look for my contact information)
Please I appreciate your feedbacks it helps me to keep my blog useful for the community.