Notice

This document is for a development version of Ceph.

Installing Ceph Packages

Install the Ceph packages with APT or DNF, or install a Ceph build. Hosts that cephadm manages do not need these packages; see Using Cephadm to Deploy a New Ceph Cluster. Other deployment tools, such as Juju, install the packages themselves.

Prerequisites

  • For APT or DNF, the Ceph repository, added as described in Getting Ceph Packages.

  • For a build, a Ceph build; see Build Ceph.

  • Root access, or a user with sudo.

Procedure

Installing with APT

  1. Install the packages:

    sudo apt-get install ceph ceph-mds
    

    APT asks you to confirm, then shows a Setting up line for each package. The ceph package depends on ceph-mon, ceph-mgr, and ceph-osd, the Monitor, Manager, and OSD daemons. It only recommends ceph-mds, the Metadata Server, so the command names ceph-mds too.

Installing with DNF

  1. Check that each section of ceph.repo sets priority=2:

    grep priority /etc/yum.repos.d/ceph.repo
    

    The command prints priority=2 once for each section. If it prints nothing, the file came from cephadm add-repo or from the ceph-release package, which set no priority; add priority=2 to each section, as shown in the RHEL section of Getting Ceph Packages.

  2. Install the packages:

    sudo dnf install ceph
    

    DNF asks you to confirm. If it asks to import key 0x460F3994, check that the fingerprint is 08B7 3419 AC32 B4E9 66C1 A330 E84A C2C0 460F 3994. Complete! is the last line of the output. The ceph package requires ceph-mon, ceph-mgr, ceph-osd, and ceph-mds.

Installing a Build

Warning

sudo ninja install writes into /usr/local, the CMake default prefix, as root and replaces any files that are already there. Do not install a build on a host that has Ceph packages installed: the packages are under /usr, so the host would have two versions of each command.

  1. From the build directory, install the build:

    sudo ninja install
    

    The output lists each file that it installs; the executables go in /usr/local/bin.

  2. Create the directory for the Ceph configuration file:

    sudo mkdir -p /etc/ceph
    

    The command prints nothing on success. Put the configuration file in /etc/ceph/ceph.conf. Ceph also looks in ~/.ceph/ceph.conf and in the current directory, but not in /usr/local/bin. ls /etc/ceph then lists ceph.conf.

Verification

  • Check the installed version:

    ceph --version
    

    The output starts with ceph version and the version number, for example 20.2.4, followed by the commit ID and the release name, for example tentacle.

Troubleshooting

  • “Unable to locate package ceph” or “No match for argument: ceph”. The Ceph repository is not configured. Add it as described in Getting Ceph Packages.

  • The installed release is older than the one you added. The packages came from the distribution’s own repository. Check the Ceph repository with the Verification section of Getting Ceph Packages, then install again.

  • “nothing provides luarocks” or “nothing provides libtcmalloc.so.4()(64bit)”. EPEL is not enabled. See step 2 of the RHEL section of Getting Ceph Packages.

  • “nothing provides lua-devel” or “nothing provides liblttng-ust.so.1()(64bit)”. The CRB repository is not enabled. See steps 3 and 4 of the RHEL section of Getting Ceph Packages.

  • “No match for argument: yum-plugin-priorities”. Older guides install this plugin. It does not exist on EL 9 or EL 10, and DNF reads the priority setting of a repository without it, so skip that step.

  • “No match for argument: python-argparse”. Older guides install snappy, gdisk, python-argparse, and gperftools-libs before Ceph. DNF installs the dependencies with ceph (gperftools-libs from EPEL), and python-argparse does not exist on EL 9 or EL 10, so skip that step.

  • “ninja: error: loading ‘build.ninja’: No such file or directory”. The command did not run in the build directory. Change to the build directory of the source tree, then run sudo ninja install again.

Next Steps

Additional Resources

Brought to you by the Ceph Foundation

The Ceph Documentation is a community resource funded and hosted by the non-profit Ceph Foundation. If you would like to support this and our other efforts, please consider joining now.