opennebula 从源码编译

前面几点与官网上介绍的一样: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 at:

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 should 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>

后面的编译如下:
### BUILDING

Compilation is done using **scons** command:

    $ scons [OPTION=VALUE]

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

        OPTION      VALUE
        sqlite_db   path-to-sqlite-install
        sqlite      no if you don't want to build sqlite support
        mysql       yes if you want to build mysql support
        xmlrpc      path-to-xmlrpc-install
        parsers     yes if you want to rebuild flex/bison files

这里使用的是scons -j2
scons mysql=yes xmlrpc=/usr/lib64/gcj/xmlrpc/
开始报错:
In file included from src/nebula/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/Nebula.o] Error 1
搜索了一下,原来是只安装了mysql,没有安装mysql-devel

### 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 of:
 
    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, the
            installation will be performed system wide
    -r      remove Opennebula, only useful if -d was not specified,
            otherwise rm -rf $ONE_LOCATION would do the job
    -h      prints installer help

我安装的目录:sh install.sh -d /srv/cloud/one

原文链接: https://www.cnblogs.com/chinacloud/archive/2010/12/15/1906341.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    opennebula 从源码编译

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/18815

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月7日 下午7:43
下一篇 2023年2月7日 下午7:43

相关推荐