Opennebula source code compilation

Source: Internet
Author: User

The previous points with the official website introduced the same: http://www.opennebula.org/documentation:rel2.0:notes
Ruby

 

We can install the standard packages directly with Yum:

 

$ Yum install Ruby ruby-devel ruby-docs ruby-ri ruby-IRB ruby-rdoc

To install rubygems we must activate the epel Repository:

$ Wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
$ Yum localinstall epel-release-5-3.noarch.rpm
$ Yum install rubygems

Once rubygems is installed we can install the following gems:

Gem install nokogiri rake xmlparser

Scons

The version that comes with centos is not compatible with our buildscripts. to install a more recent version you can download the rpm:

Http://www.scons.org/download.php

 

$ Wget http://prdownloads.sourceforge.net/scons/scons-1.2.0-1.noarch.rpm
$ Yum localinstall scons-1.2.0-1.noarch.rpm

XMLRPC-C

You can download the XMLRPC-C and XMLRPC-C packages from the RPM repository at http://centos.karan.org /.

 

$ Wget http://centos.karan.org/el5/extras/testing/i386/RPMS/xmlrpc-c-1.06.18-1.el5.kb.i386.rpm
$ Wget http://centos.karan.org/el5/extras/testing/i386/RPMS/xmlrpc-c-devel-1.06.18-1.el5.kb.i386.rpm
$ Yum localinstall xmlrpc-c-1.06.18-1.el5.kb.i386.rpm xmlrpc-c-devel-1.06.18-1.el5.kb.i386.rpm

SQLite

This package shoshould be installed from source, you can download the tar.gz from http://www.sqlite.org/download.html. It was tested with SQLite 3.5.9.

 

$ Wget http://www.sqlite.org/sqlite-amalgamation-3.6.17.tar.gz
$ Tar xvzf sqlite-amalgamation-3.6.17.tar.gz
$ CD sqlite-3.6.17/
$./Configure
$ Make
$ Make install

If you do not install it to a system wide location (/usr or/usr/local) You need to add LD_LIBRARY_PATH and tell scons where tofind the files:

 

$ Scons SQLite = <path where you installed SQLite>

The subsequent compilation is as follows:
### Building

Compilation is done using ** scons ** command:

$ Scons [option = value]

The argument expression * [Optional] * is used to set non-default values:

option value
sqlite_db path-to-SQLite-install
SQLite no if you don't want to build SQLite support
MySQL yes if you want build MySQL support
XMLRPC path-to-XMLRPC-install
parsers yes if you want to rebuild flex/Bison files

Here scons-J2 is used
Scons MySQL = Yes XMLRPC =/usr/lib64/gcj/XMLRPC/
Start to report error:
In file encoded ded from src/nebula. CC: 21:
Include/mysqldb. h: 37: 19: Error: mysql. h: no such file or directory
Include/mysqldb. h: 82: Error: iso c ++ forbids declaration of 'mysql' with no type
Include/mysqldb. h: 82: Error: Expected '; 'before' * 'token
Scons: *** [src/nebula. O] Error 1
After searching, it turns out that only MySQL is installed, and MySQL-devel is not installed.

### Installation

* Opennebula can be installed in two modes: system-wide, or in self-contained
Directory. In either case, you do not need to run opennebula as root. These
Options can be specified when running the install script:

$./Install. Sh install_options

Where ** install_options ** can be one or more:

Option value
-U user that will run opennebula, defaults to user executing
Install. Sh
-G group of the user that will run opennebula, defaults to user
Executing install. Sh
-K keep current configuration files, useful when upgrading
-D target installation directory. If defined, it will specified
The path for the self-contained install. If not defined,
Installation will be installed med system wide
-R remove opennebula, only useful if-D was not specified,
Otherwise Rm-RF $ one_location wocould do the job
-H prints installer help

My installation directory: sh install. Sh-D/srv/cloud/One

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.