• 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

  • 相关阅读:
    Electron应用使用electron-builder配合electron-updater实现自动更新(windows + mac)
    Electron 桌面应用打包(npm run build)简述(windows + mac)
    Electron 打包Mac安装包代码签名问题解决方案Could not get code signature for running application
    安装SQL Server 2012过程中出现“启用windows功能NetFx3时出错”(错误原因、详细分析及解决方法)以及在Windows Server2012上安装.NET Framework 3.5的详细分析及安装过程
    SQL Server 2012 Enterprise Edition安装过程详解(包含每一步设置的含义)
    Wmic获取Windows硬件资源信息
    基于Mint UI和MUI开发VUE项目一之环境搭建和首页的实现
    GitHub常用命令及使用
    webpack安装,常见问题和基本插件使用
    vue,react,angular三大web前端流行框架简单对比
  • 原文地址:https://www.cnblogs.com/chinacloud/p/1906341.html
Copyright © 2020-2023  润新知