In September I tried to install OpenNebula 3.6 using source files as I couldn’t find rpm packages for CentOS but maybe I wasn’t clever enough because according to OpenNebula web page you can download packages for the latest release. Installing from source was easy (let me know if you want me to write a post about the steps I followed) but if you have rpm packages you can have OpenNebula running in five minutes. Enough chat, back to work!
- You’ll have to download OpenNebula rpm packages. Go to http://downloads.opennebula.org/ fill the form and don’t forget to select OpenNebula 3.8.X Centos 6.3 tarball under Software Component.
- You’ll need to enable EPEL repository on your system. If you don’t know how to do that, download the following rpm and install it:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6-8.noarch.rpm
- Updated 29/12/2012. You can skip steps 4 and 5 (I keep them only for reference). As Kolmis suggests, it’s better to use yum localinstall to install OpenNebula rpm packages so dependencies are solved:
tar xvfz CentOS-6.3-opennebula-3.8.1.tar.gz cd opennebula-3.8.1 yum --nogpgcheck localinstall opennebula-3.8.1-1.x86_64.rpm yum --nogpgcheck localinstall opennebula-sunstone-3.8.1-1.x86_64.rpm
- With root privileges download the following packages required by OpenNebula (remember, you need EPEL repository!). Note: As I installed OpenNebula 3.6 previously in my system it’s possible that I downloaded some required packages that are not listed in the following yum command, please let me know if you have any problem so I can update this post with your help.
yum install ruby rubygems rubygem-nokogiri rubygem-json rubygem-rack rubygem-sequel rubygem-sinatra rubygem-sqlite3-ruby rubygem-thin rubygem-uuidtools xmlrpc-c-c++ xmlrpc-c-client++
- Untar the OpenNebula file and install the packages (I’ve only installed openebula and opennebula-sunstone packages).
tar xvfz CentOS-6.3-opennebula-3.8.1.tar.gz cd opennebula-3.8.1 rpm -Uvh opennebula-3.8.1-1.x86_64.rpm rpm -Uvh opennebula-sunstone-3.8.1-1.x86_64.rpm
- Ok. Everything is ready. OpenNebula created the oneadmin user (home directory: /var/lib/one) and installed /etc/init.d scripts (thanks OpenNebula guys!) so it’s easy to start and stop the daemons. Let’s start the OpenNebula service as root
# service opennebula start Starting OpenNebula daemon: [ OK ]
And now let’s check if opennebula is ready to have fun. Warning: If you run the following command as root, the following message will be shown “ONE_AUTH file not present” (there’s no authentication file with OpenNebula credentiales in your home directory), so please use your new oneadmin account to manage OpenNebula.
# su oneadmin [oneadmin@server ~]$ onevm list ID USER GROUP NAME STAT UCPU UMEM HOST TIME
If you see ID, USER, GROUP… after running the onevm list command, everything looks fine. In a few days I’ll post about OpenNebula configuration and some interesting commands. Enjoy!