2012-05-18 20:54:51 +00:00
|
|
|
=====================
|
|
|
|
Build Ceph Packages
|
|
|
|
=====================
|
2012-11-08 06:16:10 +00:00
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
To build packages, you must clone the `Ceph`_ repository. You can create
|
|
|
|
installation packages from the latest code using ``dpkg-buildpackage`` for
|
|
|
|
Debian/Ubuntu or ``rpmbuild`` for the RPM Package Manager.
|
2012-04-25 21:46:51 +00:00
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
.. tip:: When building on a multi-core CPU, use the ``-j`` and the number of
|
|
|
|
cores * 2. For example, use ``-j4`` for a dual-core processor to accelerate
|
|
|
|
the build.
|
2012-04-25 21:46:51 +00:00
|
|
|
|
2012-05-01 02:03:53 +00:00
|
|
|
Advanced Package Tool (APT)
|
2012-11-08 06:16:10 +00:00
|
|
|
===========================
|
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
To create ``.deb`` packages for Debian/Ubuntu, ensure that you have cloned the
|
|
|
|
`Ceph`_ repository, installed the `build prerequisites`_ and installed
|
|
|
|
``debhelper``::
|
2012-04-25 21:46:51 +00:00
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
sudo apt-get install debhelper
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2013-01-03 21:28:06 +00:00
|
|
|
Once you have installed debhelper, you can build the packages::
|
2012-05-01 02:03:53 +00:00
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
sudo dpkg-buildpackage
|
2012-05-03 17:15:21 +00:00
|
|
|
|
|
|
|
For multi-processor CPUs use the ``-j`` option to accelerate the build.
|
|
|
|
|
2012-05-01 02:03:53 +00:00
|
|
|
RPM Package Manager
|
2012-11-08 06:16:10 +00:00
|
|
|
===================
|
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
To create ``.rpm`` packages, ensure that you have cloned the `Ceph`_ repository,
|
|
|
|
installed the `build prerequisites`_ and installed ``rpm-build`` and
|
|
|
|
``rpmdevtools``::
|
2012-05-01 02:03:53 +00:00
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
yum install rpm-build rpmdevtools
|
2012-05-03 17:15:21 +00:00
|
|
|
|
2012-05-01 02:03:53 +00:00
|
|
|
Once you have installed the tools, setup an RPM compilation environment::
|
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
rpmdev-setuptree
|
2012-05-01 02:03:53 +00:00
|
|
|
|
2012-05-03 17:15:21 +00:00
|
|
|
Fetch the source tarball for the RPM compilation environment::
|
2012-05-01 02:03:53 +00:00
|
|
|
|
2012-06-16 21:50:29 +00:00
|
|
|
wget -P ~/rpmbuild/SOURCES/ http://ceph.com/download/ceph-<version>.tar.gz
|
2012-05-01 02:03:53 +00:00
|
|
|
|
2012-08-17 17:41:06 +00:00
|
|
|
Or from the EU mirror::
|
2012-08-15 10:13:07 +00:00
|
|
|
|
|
|
|
wget -P ~/rpmbuild/SOURCES/ http://eu.ceph.com/download/ceph-<version>.tar.gz
|
|
|
|
|
2012-05-01 02:03:53 +00:00
|
|
|
Build the RPM packages::
|
|
|
|
|
2012-05-18 20:54:51 +00:00
|
|
|
rpmbuild -tb ~/rpmbuild/SOURCES/ceph-<version>.tar.gz
|
2012-05-03 17:15:21 +00:00
|
|
|
|
|
|
|
For multi-processor CPUs use the ``-j`` option to accelerate the build.
|
2012-05-01 02:03:53 +00:00
|
|
|
|
2012-05-03 17:10:29 +00:00
|
|
|
.. _build prerequisites: ../build-prerequisites
|
2012-12-03 20:22:37 +00:00
|
|
|
.. _Ceph: ../clone-source
|