Installing the Software 3.8

This page will show you how to install OpenNebula from the binary packages. Please read the [[.:plan|Planning the Installation guide]] before you proceed. {{INLINETOC}} ====== Package Installation (Front-End) ====== Visit the [[:software:software | 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 [[.:compile | Building from Source Code guide]] if there are no packages for it. ===== CentOS platform notes ===== Before installing: * activate the [[http://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F|EPEL]] repo. These are the packages available for this distribution: * **opennebula**: main OpenNebula binaries * **opennebula-sunstone**: OpenNebula Sunstone daemon (depends on **opennebula**) * **opennebula-java**: OpenNebula JAVA OCA //External Reference:// The CentOS community provides specific installation instructions for CentOS [[http://wiki.centos.org/Cloud/OpenNebula| that can be found here.]] ===== openSUSE platform notes ===== Before installing: * activate the [[http://wiki.links2linux.de/wiki/PackMan:FAQ_(en)|PackMan]] repo. These are the packages available for this distribution: * **opennebula**: main OpenNebula binaries * **opennebula-devel**: Examples, manpages and install_gems and install_novnc (depends on **opennebula**) * **opennebula-zones**: OpenNebula OZones (depends on **opennebula**) * **opennebula-sunstone**: OpenNebula Sunstone (depends on **opennebula**) //External Reference:// The SUSE community provides specific installation instructions for OpenSUSE and SLE that can be [[http://en.opensuse.org/SDB:Cloud_OpenNebula|found here]] and [[http://en.opensuse.org/SDB:KIWI_Cookbook_ONebula_Cloud| here]] ===== Debian and Ubuntu platform notes ===== These are the packages available for these distributions: {{:debian-opennebula.png?600|}} * **opennebula-common**: provides the user and common files * **libopennebula-ruby**: all ruby libraries * **opennebula-node**: prepares a node as an opennebula-node * **opennebula-sunstone**: OpenNebula Sunstone Web Interface * **opennebula-tools**: Command Line interface * **opennebula**: OpenNebula Daemon ===== ArchLinux platform notes ===== OpenNebula is available at the Arch User Repository (AUR), [[https://aur.archlinux.org/packages/opennebula/|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 {{documentation:rel3.4:sw_small.png}} ====== 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: # /usr/share/one/install_gems 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: * sqlite3 development library * mysql client development library * curl development library * libxml2 and libxslt development libraries * ruby development library * gcc and g++ * make If you want to install only a set of gems for an specific component read [[compile | Building from Source Code]] where it is explained in more depth. The following is required for the Front-End: * **ruby** >= 1.8.7 ====== Requirements (Hosts) ====== You don't need to install any OpenNebula component in your hosts. These are the only requirements in the host machines: * ssh server running * hypervisor working properly configured * **ruby** >= 1.8.7 ====== 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. * Get the user and group id of oneadmin. This id will be used later to create users in the hosts with the same id. In the **front-end**, execute as oneadmin: $ id oneadmin uid=1001(oneadmin) gid=1001(oneadmin) groups=1001(oneadmin) In this case the user id will be 1001 and group also 1001. Then log as root **in your hosts** and follow these steps: * Create the **''oneadmin''** group. Make sure that its id is the same as in the frontend. In this example 1001: # groupadd --gid 1001 oneadmin * Create the **''oneadmin''** account, we will use the OpenNebula ''var'' directory as the home directory for this user. # useradd --uid 1001 -g oneadmin -d /var/lib/one oneadmin
:!: 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**: * Generate ''oneadmin'' ''ssh'' keys: $ ssh-keygen When prompted for password press enter so the private key is not encrypted. * Append the public key to ''~/.ssh/authorized_keys'' to let ''oneadmin'' user log without the need to type a password. $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys * Many distributions (RHEL/CentOS for example) have permission requirements for the public key authentication to work: $ chmod 700 ~/.ssh/ $ chmod 600 ~/.ssh/id_dsa.pub $ chmod 600 ~/.ssh/id_dsa $ chmod 600 ~/.ssh/authorized_keys * Tell ssh client to not ask before adding hosts to ''known_hosts'' file. Also it is a good idea to reduced the connection timeout in case of network problems. This is configured into ''~/.ssh/config'', see ''man ssh_config'' for a complete reference.: $ cat ~/.ssh/config ConnectTimeout 5 Host * StrictHostKeyChecking no * Check that the ''sshd'' daemon is running in the hosts. Also remove any ''Banner'' option from the ''sshd_config'' file in the hosts. * Finally, Copy the front-end ''/var/lib/one/.ssh'' directory 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. ====== Starting OpenNebula (Front-End) ====== Log in as the **''oneadmin''** user follow these steps: * Set oneadmin's OpenNebula credentials (username and password) adding the following to **''~/.one/one_auth''** (change ''password'' for the desired password): $ mkdir ~/.one $ echo "oneadmin:password" > ~/.one/one_auth $ chmod 600 ~/.one/one_auth * You are ready to start the OpenNebula daemons: $ one start
:!: 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: $ 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 ''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 [[cg|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: * [[sunstone|Sunstone GUI Server]] * [[ozonescfg|Introduction to oZones]] * [[introc|Public Cloud servers to expose EC2 and OCCI interfaces]]