Skip to content

OpenNebula Installation on CentOS 5.5

March 3, 2011

Prerequisites

You need to enable EPEL repo for installing some packages, e.g. rubygems. See Fedora project wiki on how to enable this.

Install required packages using yum

sudo yum -y install glibc glibc-common glibc-devel cpp glibc-headers kernel-headers libgomp libstdc++-devel nscd gcc-c++ rpm-build  yum-utils pkgconfig 
sudo yum -y install libxml2 libxml2-devel expat expat-devel libxslt libxslt-devel openssl openssl-devel curl curl-devel 
sudo yum -y install ruby ruby-libs ruby-devel ruby-irb ruby-docs ruby-rdoc ruby-ri rubygems cmake

Install sqlite db from source

wget http://www.sqlite.org/sqlite-amalgamation-3.6.17.tar.gz -P /tmp
sudo tar xvzf /tmp/sqlite-amalgamation-3.6.17.tar.gz -C /usr/local/src
pushd /usr/local/src/sqlite-3.6.17/
sudo ./configure
sudo make
sudo make install
popd

Install xmlrpc

wget -P /tmp http://centos.karan.org/el5/extras/testing/SRPMS/xmlrpc-c-1.06.18-1.el5.kb.src.rpm  
rpmbuild --rebuild /tmp/xmlrpc-c-1.06.18-1.el5.kb.src.rpm 
sudo yum -y --nogpgcheck localinstall /usr/src/redhat/RPMS/x86_64/xmlrpc-c-*.rpm

Install scons

wget -P /tmp http://prdownloads.sourceforge.net/scons/scons-2.0.1-1.noarch.rpm
sudo yum -y --nogpgcheck localinstall /tmp/scons-2.0.1-1.noarch.rpm

install gems

sudo gem install nokogiri rake xmlparser

Add oneadmin user

sudo /usr/sbin/useradd -u50000 oneadmin

Create OpenNebula install directory

sudo mkdir -p /srv/cloud/one
sudo chown -R oneadmin:oneadmin /srv/cloud

Download and install OpenNebula

wget -P /tmp http://dev.opennebula.org/attachments/download/264/opennebula-2.0.1.tar.gz 
pushd /tmp
tar xvzf opennebula-2.0.1.tar.gz 
pushd opennebula-2.0.1 
scons
./install.sh -u oneadmin -g oneadmin -d /srv/cloud/one
popd
popd

Configure shell environment

Add following to ~/.bashrc file

cat >> $HOME/.bashrc <<\EOF
# User specific aliases and functions
export ONE_LOCATION=/srv/cloud/one
export ONE_AUTH=$HOME/.one_auth
export ONE_XMLRPC=http://localhost:2633/RPC2
export PATH=/srv/cloud/one/bin:$PATH 
EOF
source ~/.bashrc

Add username and password to ONE_AUTH file

We need to create an account using $ONE_AUTH file – specifying username and password separated by a colon ‘:’. The first account created will run as an administrator account.

echo "oneadmin:secretpassword" >> $ONE_AUTH

Start OpenNebula as ‘oneadmin’ system user

one start
Advertisements

From → Systems

7 Comments
  1. Henry Nguyen permalink

    Thanks for your helpful post, but some of the “yum install” commands have been cut off. In particular I’m having problem with these packages. Could you provide some pointers where to get those. I’m trying to eval opennebula. Thanks.

    No package xmlrpc-c-c++ available.
    No package libxmlrpc-c-client available.
    No package libxmlrpc-c-client++ available.

    $sudo rpm -ivh opennebula-2.2-1.x86_64.rpm –test
    error: Failed dependencies:
    libxmlrpc++.so.3()(64bit) is needed by opennebula-2.2-1.x86_64
    libxmlrpc_client++.so.3()(64bit) is needed by opennebula-2.2-1.x86_64
    libxmlrpc_server++.so.3()(64bit) is needed by opennebula-2.2-1.x86_64
    libxmlrpc_server_abyss++.so.3()(64bit) is needed by opennebula-2.2-1.x86_64

  2. 1derboy permalink

    Regarding commands getting cut-off: it was a wordpress theme issue and that should be fixed now.

    I think you are installing OpenNebula using rpm, whereas above instructions are for source based install. But I think it should be useful for you to install dependency packages. Looking at the error you mentioned, I think you are missing xmlrpc packages here. You can install it using http://centos.karan.org/el5/ repo as shown above.

    Important: Above install was done for OpenNebula 2.0 using default CentOS ruby 1.8.5 version. It worked fine for me however, I noticed at least one problem when I upgraded to OpenNebula 2.2 version. The Sunstone web interface for OpenNebula will not work with ruby 1.8.5 version. I would suggest you to start with ruby 1.8.7 version itself. You can install it from source or use rvm, however I installed it using yum. See: http://centos.karan.org/el5/ruby187/ . If you have any rubygems installed with 1.8.5 then you may need to reinstall them. Hope this helps..

  3. nin permalink

    Hi! I followed your installation guide and was successful. If I upgrade to OpenNebula 2.2.1 using RPM, what considerations should I take?
    Thanks!

  4. darshan permalink

    hi, i am darshan…i am trying to install opennebula. at the time of installing and executing the command, i had face two errors.

    1) From the above code, in “install xmlrpc” section, i am not able to rum following command “sudo yum -y –nogpgcheck localinstall /usr/src/redhat/RPMS/x86_64/xmlrpc-c-*.rpm”, it would generate the error like “could not found”

    2) again i am not able to execute the following command: “sudo gem install nokogiri rake xmlparser”, it would generate the error like “sudo: gem: command not found”

    • 1derboy permalink

      Darshan,
      These instructions were written for CentOS 5.5 and OpenNebula 2.2. Now there are newer versions available for both of these softwares – CentOS 6.2 and OpenNebula 3.0; the OpenNebula 3.0 official documentation has a nice set of installation instructions as well. I think you should try the latest codebase and the latest official documentation instead of my notes above. Also note that the OpenNebula 3.0 seems to have an RPM available which should make CentOS/RedHat installation easy. I haven’t tried the RPM install, but I have installed it from the source and it worked fine. I will post my notes on it soon.

      Now addressing the errors you received – your system is missing some packages (rpm-build and rubygems) and hence the errors related to command not found. These packages are covered in the first step ‘Install required packages using yum’. You may have missed this step.

      • darshan permalink

        thanks for your reply….if you have notes available for the configuration of nodes with frontends with set of commands on the same platform(CentOS 5.5, Openebula2.0) then please send me…or if you have best knowledge regarding this then please send me….

      • darshan permalink

        thanks for your reply….if you have notes available for the configuration of nodes with frontends with set of commands on the same platform(CentOS 5.5, Openebula2.0) then please send me…or if you have best knowledge regarding this then please send me…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: