3.6. Building RPMs from Source
来源:互联网 发布:拆分资金盘 php源码 编辑:程序博客网 时间:2024/05/29 04:33
3.6. Building RPMs from Source
As mentioned previously in Section 3.3, “Prerequisites for building Apache CloudStack”,you will need to install several prerequisites before you can build packages for CloudStack. Here we'll assume you're working with a 64-bit build of CentOS or Red Hat Enterprise Linux.
# yum groupinstall "Development Tools"
# yum install java-1.6.0-openjdk-devel.x86_64 genisoimage mysql mysql-server ws-commons-util MySQL-python tomcat6 createrepo
Next, you'll need to install build-time dependencies for CloudStack with Maven. We're using Maven 3, so you'll want tograb a Maven 3 tarball and uncompress it in your home directory (or whatever location you prefer):
$ tar zxvf apache-maven-3.0.4-bin.tar.gz
$ export PATH=/usr/local/apache-maven-3.0.4//bin:$PATH
Maven also needs to know where Java is, and expects the JAVA_HOME environment variable to be set:
$ export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/
Verify that Maven is installed correctly:
$ mvn --version
You probably want to ensure that your environment variables will survive a logout/reboot. Be sure to update
~/.bashrc
with the PATH and JAVA_HOME variables.Building RPMs for CloudStack is fairly simple. Assuming you already have the source downloaded and have uncompressed the tarball into alocal directory, you're going to be able to generate packages in just afew minutes.
Packaging has Changed
If you've created packages for CloudStack previously, you should be aware that the process has changed considerably since the project has moved to using Apache Maven. Please be sure to follow the steps in this section closely.
3.6.1. Generating RPMS
Now that we have the prerequisites and source, you will cd to the
packaging/centos63/
directory.$
cd packaging/centos63
Generating RPMs is done using the
package.sh
script:$
./package.sh
That will run for a bit and then place the finished packages in
dist/rpmbuild/RPMS/x86_64/
.You should see the following RPMs in that directory:
cloudstack-agent-4.2.0.el6.x86_64.rpm cloudstack-awsapi-4.2.0.el6.x86_64.rpm cloudstack-cli-4.2.0.el6.x86_64.rpm cloudstack-common-4.2.0.el6.x86_64.rpm cloudstack-docs-4.2.0.el6.x86_64.rpm cloudstack-management-4.2.0.el6.x86_64.rpm cloudstack-usage-4.2.0.el6.x86_64.rpm
3.6.1.1. Creating a yum repo
While RPMs is a useful packaging format - it's most easily consumed from Yum repositories over a network. The next step is to create a YumRepo with the finished packages:
$
mkdir -p ~/tmp/repo
$
cp dist/rpmbuild/RPMS/x86_64/*rpm ~/tmp/repo/
$
createrepo ~/tmp/repo
The files and directories within
~/tmp/repo
can now be uploaded to a web server and serve as a yum repository.3.6.1.2. Configuring your systems to use your new yum repository
Now that your yum repository is populated with RPMs and metadata we need to configure the machines that need to install CloudStack. Createa file named
/etc/yum.repos.d/cloudstack.repo
with this information: [apache-cloudstack] name=Apache CloudStack baseurl=http://webserver.tld/path/to/repo
enabled=1 gpgcheck=0
Completing this step will allow you to easily install CloudStack on a number of machines across the network.
0 0
- 3.6. Building RPMs from Source
- Building Kernel from source
- Building X10 from Source
- Chapter 3. Building from Source
- Source RPMs for Broadcom drivers
- Building a Linux Kernel from source
- Building an ARM GCC Toolchain from Source
- Building Visual Leak Detector from Source
- Running emulator after building Android from source
- Qt for Linux/X11 - Building from Source
- (OK) Building Android from AOSP source code
- About Xorg building from the source codes
- Building Ext From Source(制定自己的EXT版本)
- Tutorial:Building Ext From Source(制定自己的EXT版本)
- Building Apache2 From Source on Linux (Redhat 8)
- Android for MSM Project,Downloading and Building from Source
- building-gcc-4-8-from-source-on-ubunu-12-04/
- Getting Started With OData Part 2: Building an OData Services from Any Data Source
- 直接插入排序
- java中获取map的键值对方法
- linux开发之Valgrind代码使用内存检测的使用说明
- 一组PKCS#11 RSA签名测试数据
- PAT记录
- 3.6. Building RPMs from Source
- 50个必备的实用jQuery代码段+ 可以直接拿来用的15个jQuery代码片段
- linux下播放器设计和开发
- IPD流程在华为15年发展历程…
- C#的6种常用集合类大比拼
- COCOS2D-X之CPP调用Android函数Demo
- ZOJ 3763 —— Plasma Field(几何,数学)
- 设计模式学习(四)——装饰者模式
- Android发展史