The HAProxy load balancer supports a range of free open-source OS. In this guide, we will cover one of the simpler methods of deploying HAProxy on the Debian OS via the haproxy.debian.net service. The procedure is as follows:
1.Open the installation service page by clicking https://haproxy.debian.net/
2.Select the OS and its version, afterwards select the HAProxy version (Fig. 1).
Note
Use the cat /etc/issue command to check the version of the currently installed Debian OS.
As a result, the service will generate a set of commands that must be executed in the Debian OS to install HAProxy.
3.Execute the generated commands one after another.
For example, to install HAProxy of version 1.8 on Debian 8 (Jessie), execute the following commands:
echo deb http://httpredir.debian.org/debian jessie-backports main | \
tee /etc/apt/sources.list.d/backports.list
echo deb http://haproxy.debian.net jessie-backports-1.8 main | \
tee /etc/apt/sources.list.d/haproxy.list
apt-get update
apt-get install haproxy -t jessie-backports\*
Attention
Since HAProxy and Debian are constantly being updated and amended, we recommend using the https://haproxy.debian.net/ service for receiving the up-to-date commands. The commands listed here are merely examples.