[[ch-install-packages]]
== Installing pre-built DRBD binary packages


[[s-linbit-packages]]
=== Packages supplied by LINBIT

LINBIT, the DRBD project's sponsor company, provides binary packages to its commercial support customers.
These packages are available via repositories (e.g., `apt`, `yum`), and when reasonable via LINBIT's docker
registry. Packages/images from these sources are considered "official" builds.

These builds are available for the following distributions:

* Red Hat Enterprise Linux (RHEL), versions 6, 7 and 8

* SUSE Linux Enterprise Server (SLES), versions 11SP4, 12 and 15

* Debian GNU/Linux, 9 (stretch), 10 (buster), and 11 (bullseye)

* Ubuntu Server Edition LTS 16.04 (Xenial Xerus), LTS 18.04 (Bionic Beaver), and LTS 20.04 (Focal Fossa).

Packages for some other distributions are built as well, but don't receive as much testing.

LINBIT releases binary builds in parallel with any new DRBD source
release.

Package installation on RPM-based systems (SLES, RHEL) is done by
simply invoking `yum install` (for new installations) or `yum update` (for
upgrades).

For Debian-based systems (Debian GNU/Linux, Ubuntu) systems,
`drbd-utils` and `drbd-module-`uname -r`` packages are installed with `apt`,
or similar tools like `aptitude` or `synaptic`, if available.

[[s-ko-signing]]
==== Secure Boot / Kernel module signing
LINBIT signs most of its kernel module object files, the following table gives an overview when signing for distributions started:

[options="header"]
|===
| Distribution | Module signing since DRBD release
| RHEL7        | 8.4.12/9.0.25/9.1.0
| RHEL8        | 9.0.25/9.1.0
| SLES15       | 9.0.31/9.1.4
| Debian       | 9.0.30/9.1.3
| Ubuntu       | 9.0.30/9.1.3
|===

The public signing key is shipped in the rpm package and gets installed to
`/etc/pki/linbit/SECURE-BOOT-KEY-linbit.com.der`. It can be enrolled via:

---------------------------------------
# mokutil --import /etc/pki/linbit/SECURE-BOOT-KEY-linbit.com.der
input password:
input password again:
---------------------------------------

A password can be chosen freely. It will be used when the key is actually enrolled to the MOK list after the
required reboot.

[[s-docker-registry]]
=== Docker images supplied by LINBIT
LINBIT provides a Docker registry for its commercial support customers. The registry is accessible via
the host name 'drbd.io'. Before you can pull images, you have to log in to the registry:

---------------------------------------
# docker login drbd.io
---------------------------------------

After a successful login, you can pull images. To test your login and the registry, start by issuing the
following command:

---------------------------------------
# docker pull drbd.io/alpine
# docker run -it --rm drbd.io/alpine # press CTRL-D to exit
---------------------------------------

[[s-distro-packages]]
=== Packages supplied by distribution vendors

A number of distributions provide DRBD, including pre-built binary
packages. Support for these builds, if any, is being provided by the
associated distribution vendor. Their release cycle may lag behind
DRBD source releases.

[[s-install-pkgs-suse_linux_enterprise_server]]
==== SUSE Linux Enterprise Server

SLES High Availability Extension (HAE) includes DRBD.


On SLES, DRBD is normally installed via the software installation
component of YaST2. It comes bundled with the High Availability
package selection.

Users who prefer a command line install may simply issue:

---------------------------------------
# yast -i drbd
---------------------------------------

or

---------------------------------------
# zypper install drbd
---------------------------------------


[[s-install-pkgs-centos]]
==== CentOS

CentOS has had DRBD 8 since release 5; for DRBD 9 you'll need to look at EPEL
and similar sources.

DRBD can be installed using `yum` (note that you will need a
correct repository enabled for this to work):

---------------------------------------
# yum install drbd kmod-drbd
---------------------------------------


[[s-install-pkgs-ubuntu_linux]]
==== Ubuntu Linux

For Ubuntu LTS, LINBIT offers a PPA repository at
https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack.
See
https://help.ubuntu.com/community/Repositories/CommandLine#Adding_Launchpad_PPA_Repositories[Adding Launchpad PPA Repositories] for more information.

---------------------------------------
# apt install drbd-utils drbd-dkms
---------------------------------------

[[s-from-source]]
=== Compiling packages from source

Releases generated by git tags on https://github.com/LINBIT[github] are snapshots of the git repository at the
given time. You most likely do not want to use these. They might lack things such as generated man pages, the
`configure` script, and other generated files. If you want to build from a tarball, use the ones
https://www.linbit.com/en/drbd-community/drbd-download[provided by us].

All our projects contain standard build scripts (e.g., `Makefile`, `configure`). Maintaining specific
information per distribution (e.g., documenting broken build macros) is too cumbersome, and historically the
information provided in this section got outdated quickly. If you don't know how to build software the
standard way, please consider using packages provided by LINBIT.

///////

[[s-_debian_gnu_linux]]
====  Debian GNU/Linux

While PPAs are not directly supported in Debian, they basically work like any
other package repository. For `jessie` you should be able to just use
the `xenial` repository in your `sources.list`:

---------------------------------------
deb http://ppa.launchpad.net/linbit/linbit-drbd9-stack/ubuntu xenial main
---------------------------------------

Then use the same command to install the software:

---------------------------------------
# apt install drbd-utils drbd-dkms
---------------------------------------

///////
