Installing the Software 3.4
This page will show you how to install OpenNebula from the binary packages. Please read the Planning the Installation guide before you proceed.
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.
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:
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:
You don't need to install any OpenNebula component in your hosts. These are the only requirements in the host machines:
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.
$ id oneadmin uid=1001(oneadmin) gid=1001(cloud) groups=1001(cloud)In this case the user id will be 1001 and group also 1001.
Then log as root in your hosts and follow these steps:
oneadmingroup. Make sure that its id is the same as in the frontend. In this example 1001:
# groupadd --gid 1001 oneadmin
oneadminaccount, we will use the OpenNebula
vardirectory as the home directory for this user.
# useradd --uid 1001 -g oneadmin -d /var/lib/one oneadmin
oneadmingroup and account in the nodes, for example NIS.
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:
$ ssh-keygenWhen prompted for password press enter so the private key is not encrypted.
oneadminuser log without the need to type a password.
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 700 ~/.ssh/ $ chmod 600 ~/.ssh/id_dsa.pub $ chmod 600 ~/.ssh/id_dsa $ chmod 600 ~/.ssh/authorized_keys
known_hostsfile. This is configured into
man ssh_configfor a complete reference.:
$ cat ~/.ssh/config Host * StrictHostKeyChecking no
sshddaemon is running in the hosts. Also remove any
Banneroption from the
sshd_configfile in the hosts.
/var/lib/one/.sshdirectory to each one of the hosts in the same path.
To test your configuration just verify that
oneadmin can log in the hosts without being prompt for a password.
Log in as the
oneadmin user follow these steps:
passwordfor the desired password):
$ mkdir ~/.one $ echo "oneadmin:password" > ~/.one/one_auth $ chmod 600 ~/.one/one_auth
$ one start
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:
$ onevm list ID USER GROUP NAME STAT CPU MEM HOSTNAME TIME
If instead of an empty list of VMs you get an error message, then the OpenNebula daemon could not be started properly:
$ onevm list Connection refused - connect(2)
The OpenNebula logs are located in
/var/log/one, you should have at least the files
sched.log, the core and scheduler logs. Check
oned.log for any error messages, marked with
[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.
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: