5 You can get Ceph software by retrieving Ceph source code and building it yourself.
6 To build Ceph, you need to set up a development environment, compile Ceph,
7 and then either install in user space or build packages and install the packages.
13 .. tip:: Check this section to see if there are specific prerequisites for your
14 Linux/Unix distribution.
16 A debug build of Ceph may take around 40 gigabytes. If you want to build Ceph in
17 a virtual machine (VM) please make sure total disk space on the VM is at least
20 Please also be aware that some distributions of Linux, like CentOS, use Linux
21 Volume Manager (LVM) for the default installation. LVM may reserve a large
22 portion of disk space of a typical sized virtual disk for the operating system.
24 Before you can build Ceph source code, you need to install several libraries
29 .. note:: Some distributions that support Google's memory profiler tool may use
30 a different package name (e.g., ``libgoogle-perftools4``).
35 Ceph is built using cmake. To build Ceph, navigate to your cloned Ceph
36 repository and execute the following::
43 See `Installing a Build`_ to install a build in user space and `Ceph README.md`_
44 doc for more details on build.
49 To build packages, you must clone the `Ceph`_ repository. You can create
50 installation packages from the latest code using ``dpkg-buildpackage`` for
51 Debian/Ubuntu or ``rpmbuild`` for the RPM Package Manager.
53 .. tip:: When building on a multi-core CPU, use the ``-j`` and the number of
54 cores * 2. For example, use ``-j4`` for a dual-core processor to accelerate
58 Advanced Package Tool (APT)
59 ---------------------------
61 To create ``.deb`` packages for Debian/Ubuntu, ensure that you have cloned the
62 `Ceph`_ repository, installed the `Build Prerequisites`_ and installed
65 sudo apt-get install debhelper
67 Once you have installed debhelper, you can build the packages::
69 sudo dpkg-buildpackage
71 For multi-processor CPUs use the ``-j`` option to accelerate the build.
77 To create ``.rpm`` packages, ensure that you have cloned the `Ceph`_ repository,
78 installed the `Build Prerequisites`_ and installed ``rpm-build`` and
81 yum install rpm-build rpmdevtools
83 Once you have installed the tools, setup an RPM compilation environment::
87 Fetch the source tarball for the RPM compilation environment::
89 wget -P ~/rpmbuild/SOURCES/ https://download.ceph.com/tarballs/ceph-<version>.tar.bz2
91 Or from the EU mirror::
93 wget -P ~/rpmbuild/SOURCES/ http://eu.ceph.com/tarballs/ceph-<version>.tar.bz2
95 Extract the specfile::
97 tar --strip-components=1 -C ~/rpmbuild/SPECS/ --no-anchored -xvjf ~/rpmbuild/SOURCES/ceph-<version>.tar.bz2 "ceph.spec"
99 Build the RPM packages::
101 rpmbuild -ba ~/rpmbuild/SPECS/ceph.spec
103 For multi-processor CPUs use the ``-j`` option to accelerate the build.
105 .. _Ceph: ../clone-source
106 .. _Installing a Build: ../install-storage-cluster#installing-a-build
107 .. _Ceph README.md: https://github.com/ceph/ceph#building-ceph