How To Install haproxy18 on CentOS 7

In this tutorial we learn how to install haproxy18 on CentOS 7. haproxy18 is HAProxy reverse proxy for high availability environments

Introduction

In this tutorial we learn how to install haproxy18 on CentOS 7.

What is haproxy18

HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. Indeed, it can - route HTTP requests depending on statically assigned cookies - spread load among several servers while assuring server persistence through the use of HTTP cookies - switch to backup servers in the event a main one fails - accept connections to special ports dedicated to service monitoring - stop accepting connections without breaking existing ones - add, modify, and delete HTTP headers in both directions - block requests matching particular patterns - report detailed status to authenticated users from a URI intercepted from the application The haproxy18 package is a backport of the regular haproxy RPM package from RHEL/CentOS 8 modified to be installable along with the regular haproxy RPM package from RHEL/CentOS 7, but linked against the libraries in the openssl11-libs RPM package from EPEL 7 for TLSv1.3 support. Run ‘/usr/libexec/haproxy18-syspaths enable’ to create some convenience symbolic links to make the haproxy18 RPM package the default haproxy.

We can use yum or dnf to install haproxy18 on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install haproxy18.

Install haproxy18 on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install haproxy18 using yum by running the following command:

sudo yum -y install haproxy18

Install haproxy18 on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install haproxy18 using dnf by running the following command:

sudo dnf -y install haproxy18

How To Uninstall haproxy18 on CentOS 7

To uninstall only the haproxy18 package we can use the following command:

sudo dnf remove haproxy18

References

Summary

In this tutorial we learn how to install haproxy18 on CentOS 7 using yum and dnf.