Table of Contents

Installing the Software 3.8

This page will show you how to install OpenNebula from the binary packages. Please read the Planning the Installation guide before you proceed.

inlinetoc

Package Installation (Front-End)

Visit the software menu to download the latest package for your distribution. OpenNebula may be included in your official distribution package repositories, but you should check if it is the latest version and download it from our page instead.

Then proceed to install the packages with the corresponding package manager for your distribution or head to Building from Source Code guide if there are no packages for it.

CentOS platform notes

Before installing:

These are the packages available for this distribution:

External Reference: The CentOS community provides specific installation instructions for CentOS that can be found here.

openSUSE platform notes

Before installing:

These are the packages available for this distribution:

External Reference: The SUSE community provides specific installation instructions for OpenSUSE and SLE that can be found here and here

Debian and Ubuntu platform notes

These are the packages available for these distributions:

ArchLinux platform notes

OpenNebula is available at the Arch User Repository (AUR), please check the opennebula package page.

Gentoo platform notes

You need to compile the xmlrpc-c package with threads support, as:

  USE="threads" emerge xmlrpc-c

Installation Layout (Front-End)

After installing the opennebula packages the following directory structure will be used

Ruby Libraries Requirements (Front-End)

Some OpenNebula components need ruby libraries. OpenNebula provides a script that installs the required gems as well as some development libraries packages needed.

As root execute: <xterm> # /usr/share/one/install_gems </xterm>

The previous script is prepared to detect common linux distributions and install the required libraries. If it fails to find the packages needed in your system, manually install these packages:

If you want to install only a set of gems for an specific component read Building from Source Code where it is explained in more depth.

The following is required for the Front-End:

Requirements (Hosts)

You don't need to install any OpenNebula component in your hosts. These are the only requirements in the host machines:

User & Group (Unix Accounts) (Front-End & Hosts)

The OpenNebula package installation creates a new user and group named oneadmin in the front-end. This account will be used to run the OpenNebula services and to do regular administration and maintenance tasks. That means that you eventually need to login as that user or to use the “sudo -u oneadmin” method.

The hosts need also this user created and configured. Make sure you change the uid and gid by the ones you have in the frontend.

<xterm> $ id oneadmin uid=1001(oneadmin) gid=1001(oneadmin) groups=1001(oneadmin) </xterm> In this case the user id will be 1001 and group also 1001.

Then log as root in your hosts and follow these steps:

<xterm> # groupadd –gid 1001 oneadmin </xterm>

<xterm> # useradd –uid 1001 -g oneadmin -d /var/lib/one oneadmin </xterm>

:!: You can use any other method to make a common oneadmin group and account in the nodes, for example NIS.

Secure Shell Access (Front-End)

You need to create ssh keys for the oneadmin user and configure the host machines so it can connect to them using ssh without need for a password.

Follow these steps in the front-end:

<xterm> $ ssh-keygen </xterm> When prompted for password press enter so the private key is not encrypted.

<xterm> $ cat ~/.ssh/id_rsa.pub » ~/.ssh/authorized_keys </xterm>

<xterm> $ chmod 700 ~/.ssh/ $ chmod 600 ~/.ssh/id_dsa.pub $ chmod 600 ~/.ssh/id_dsa $ chmod 600 ~/.ssh/authorized_keys </xterm>

<xterm> $ cat ~/.ssh/config ConnectTimeout 5 Host *

  StrictHostKeyChecking no

</xterm>

To test your configuration just verify that oneadmin can log in the hosts without being prompt for a password.

Starting OpenNebula (Front-End)

Log in as the oneadmin user follow these steps:

<xterm> $ mkdir ~/.one $ echo “oneadmin:password” > ~/.one/one_auth $ chmod 600 ~/.one/one_auth </xterm>

<xterm> $ one start </xterm>

:!: Remember to always start OpenNebula as oneadmin!

Verifying the Installation

After OpenNebula is started for the first time, you should check that the commands can connect to the OpenNebula daemon. In the front-end, run as oneadmin the command onevm:

<xterm> $ onevm list ID USER GROUP NAME STAT CPU MEM HOSTNAME TIME </xterm>

If instead of an empty list of VMs you get an error message, then the OpenNebula daemon could not be started properly: <xterm> $ onevm list Connection refused - connect(2) </xterm>

The OpenNebula logs are located in /var/log/one, you should have at least the files oned.log and sched.log, the core and scheduler logs. Check oned.log for any error messages, marked with [E].

:!: The first time OpenNebula is started, it performs some SQL queries to check if the DB exists and if it needs a bootstrap. You will have two error messages in your log similar to these ones, and can be ignored:

[ONE][I]: Checking database version.
[ONE][E]: (..) error: no such table: db_versioning
[ONE][E]: (..) error: no such table: user_pool
[ONE][I]: Bootstraping OpenNebula database.

Next Steps

Now that OpenNebula is installed, follow the Basic Configuration guide to configure the software for you infrastructure.

OpenNebula comes with additional components that can be optionally started. Read the following guides to know which other components are included with the distribution: