How To Install haproxy on Fedora 36

In this tutorial we learn how to install haproxy in Fedora 36. haproxy is HAProxy reverse proxy for high availability environments

Introduction

In this tutorial we learn how to install haproxy on Fedora 36.

What is haproxy

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

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

Install haproxy on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install haproxy

Install haproxy on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install haproxy

How To Uninstall haproxy on Fedora 36

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

sudo dnf remove haproxy

haproxy Package Contents on Fedora 36

/etc/haproxy
/etc/haproxy/haproxy.cfg
/etc/logrotate.d/haproxy
/etc/sysconfig/haproxy
/usr/bin/halog
/usr/bin/ip6range
/usr/bin/iprange
/usr/lib/.build-id
/usr/lib/.build-id/6d
/usr/lib/.build-id/6d/1e3ef1378df00a31d99249b083d182359d01ac
/usr/lib/.build-id/70
/usr/lib/.build-id/70/9ecce979334713888387b93d996f7c48fe3816
/usr/lib/.build-id/73
/usr/lib/.build-id/73/cb74c9652225e50848f05973373d5539d680f9
/usr/lib/.build-id/cb
/usr/lib/.build-id/cb/c048e053ce06a57bb2ca81bede2534e628e1d6
/usr/lib/systemd/system/haproxy.service
/usr/sbin/haproxy
/usr/share/doc/haproxy
/usr/share/doc/haproxy/51Degrees-device-detection.txt
/usr/share/doc/haproxy/CHANGELOG
/usr/share/doc/haproxy/DeviceAtlas-device-detection.txt
/usr/share/doc/haproxy/README
/usr/share/doc/haproxy/ROADMAP
/usr/share/doc/haproxy/SOCKS4.protocol.txt
/usr/share/doc/haproxy/SPOE.txt
/usr/share/doc/haproxy/VERSION
/usr/share/doc/haproxy/WURFL-device-detection.txt
/usr/share/doc/haproxy/acl-content-sw.cfg
/usr/share/doc/haproxy/acl.fig
/usr/share/doc/haproxy/architecture.txt
/usr/share/doc/haproxy/basic-config-edge.cfg
/usr/share/doc/haproxy/close-options.txt
/usr/share/doc/haproxy/coding-style.txt
/usr/share/doc/haproxy/configuration.txt
/usr/share/doc/haproxy/content-sw-sample.cfg
/usr/share/doc/haproxy/cookie-options.txt
/usr/share/doc/haproxy/design-thoughts
/usr/share/doc/haproxy/design-thoughts/backends-v0.txt
/usr/share/doc/haproxy/design-thoughts/backends.txt
/usr/share/doc/haproxy/design-thoughts/be-fe-changes.txt
/usr/share/doc/haproxy/design-thoughts/binding-possibilities.txt
/usr/share/doc/haproxy/design-thoughts/config-language.txt
/usr/share/doc/haproxy/design-thoughts/connection-reuse.txt
/usr/share/doc/haproxy/design-thoughts/connection-sharing.txt
/usr/share/doc/haproxy/design-thoughts/dynamic-buffers.txt
/usr/share/doc/haproxy/design-thoughts/entities-v2.txt
/usr/share/doc/haproxy/design-thoughts/how-it-works.txt
/usr/share/doc/haproxy/design-thoughts/http2.txt
/usr/share/doc/haproxy/design-thoughts/http_load_time.url
/usr/share/doc/haproxy/design-thoughts/rate-shaping.txt
/usr/share/doc/haproxy/design-thoughts/sess_par_sec.txt
/usr/share/doc/haproxy/gpl.txt
/usr/share/doc/haproxy/haproxy.1
/usr/share/doc/haproxy/internals
/usr/share/doc/haproxy/internals/acl.txt
/usr/share/doc/haproxy/internals/body-parsing.txt
/usr/share/doc/haproxy/internals/buffer-api.txt
/usr/share/doc/haproxy/internals/connect-status.txt
/usr/share/doc/haproxy/internals/connection-header.txt
/usr/share/doc/haproxy/internals/connection-scale.txt
/usr/share/doc/haproxy/internals/entities-v2.txt
/usr/share/doc/haproxy/internals/entities.fig
/usr/share/doc/haproxy/internals/entities.pdf
/usr/share/doc/haproxy/internals/entities.svg
/usr/share/doc/haproxy/internals/entities.txt
/usr/share/doc/haproxy/internals/fd-migration.txt
/usr/share/doc/haproxy/internals/filters.txt
/usr/share/doc/haproxy/internals/hashing.txt
/usr/share/doc/haproxy/internals/header-parser-speed.txt
/usr/share/doc/haproxy/internals/header-tree.txt
/usr/share/doc/haproxy/internals/http-cookies.txt
/usr/share/doc/haproxy/internals/http-docs.txt
/usr/share/doc/haproxy/internals/http-parsing.txt
/usr/share/doc/haproxy/internals/htx-api.txt
/usr/share/doc/haproxy/internals/initcalls.txt
/usr/share/doc/haproxy/internals/list.fig
/usr/share/doc/haproxy/internals/list.png
/usr/share/doc/haproxy/internals/listener-states.fig
/usr/share/doc/haproxy/internals/listener-states.png
/usr/share/doc/haproxy/internals/lua_socket.fig
/usr/share/doc/haproxy/internals/lua_socket.pdf
/usr/share/doc/haproxy/internals/muxes.fig
/usr/share/doc/haproxy/internals/muxes.pdf
/usr/share/doc/haproxy/internals/muxes.png
/usr/share/doc/haproxy/internals/muxes.svg
/usr/share/doc/haproxy/internals/naming.txt
/usr/share/doc/haproxy/internals/notes-layers.txt
/usr/share/doc/haproxy/internals/pattern.dia
/usr/share/doc/haproxy/internals/pattern.pdf
/usr/share/doc/haproxy/internals/polling-states.fig
/usr/share/doc/haproxy/internals/repartition-be-fe-fi.txt
/usr/share/doc/haproxy/internals/sched.fig
/usr/share/doc/haproxy/internals/sched.pdf
/usr/share/doc/haproxy/internals/sched.png
/usr/share/doc/haproxy/internals/sched.svg
/usr/share/doc/haproxy/internals/sequence.fig
/usr/share/doc/haproxy/internals/ssl_cert.dia
/usr/share/doc/haproxy/internals/stats-v2.txt
/usr/share/doc/haproxy/internals/stream-sock-states.fig
/usr/share/doc/haproxy/intro.txt
/usr/share/doc/haproxy/lgpl.txt
/usr/share/doc/haproxy/linux-syn-cookies.txt
/usr/share/doc/haproxy/lua-api
/usr/share/doc/haproxy/lua-api/Makefile
/usr/share/doc/haproxy/lua-api/_static
/usr/share/doc/haproxy/lua-api/_static/channel.fig
/usr/share/doc/haproxy/lua-api/_static/channel.png
/usr/share/doc/haproxy/lua-api/conf.py
/usr/share/doc/haproxy/lua-api/index.rst
/usr/share/doc/haproxy/lua.txt
/usr/share/doc/haproxy/management.txt
/usr/share/doc/haproxy/netscaler-client-ip-insertion-protocol.txt
/usr/share/doc/haproxy/network-namespaces.txt
/usr/share/doc/haproxy/option-http_proxy.cfg
/usr/share/doc/haproxy/peers-v2.0.txt
/usr/share/doc/haproxy/peers.txt
/usr/share/doc/haproxy/proxy-protocol.txt
/usr/share/doc/haproxy/queuing.fig
/usr/share/doc/haproxy/quick-test.cfg
/usr/share/doc/haproxy/regression-testing.txt
/usr/share/doc/haproxy/seamless_reload.txt
/usr/share/doc/haproxy/socks4.cfg
/usr/share/doc/haproxy/transparent_proxy.cfg
/usr/share/doc/haproxy/wurfl-example.cfg
/usr/share/haproxy
/usr/share/haproxy/400.http
/usr/share/haproxy/403.http
/usr/share/haproxy/408.http
/usr/share/haproxy/500.http
/usr/share/haproxy/502.http
/usr/share/haproxy/503.http
/usr/share/haproxy/504.http
/usr/share/haproxy/README
/usr/share/licenses/haproxy
/usr/share/licenses/haproxy/LICENSE
/usr/share/man/man1/halog.1.gz
/usr/share/man/man1/haproxy.1.gz
/var/lib/haproxy

References

Summary

In this tutorial we learn how to install haproxy on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).