How To Install haproxy on Fedora 34
Introduction
In this tutorial we learn how to install haproxy
on Fedora 34.
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 34. In this tutorial we discuss both methods but you only need to choose one of method to install haproxy.
Install haproxy on Fedora 34 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
After updating yum database, We can install haproxy
using dnf
by running the following command:
sudo dnf -y install haproxy
Install haproxy on Fedora 34 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
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 34
To uninstall only the haproxy
package we can use the following command:
sudo dnf remove haproxy
haproxy Package Contents on Fedora 34
/etc/haproxy
/etc/haproxy/haproxy.cfg
/etc/logrotate.d/haproxy
/etc/sysconfig/haproxy
/usr/bin/halog
/usr/bin/iprange
/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/00fb8b781deec707b4f96a6eab3df9ef615854
/usr/lib/.build-id/ba
/usr/lib/.build-id/ba/e6d79ec83ee6f69a899af4a53b4d7946f5235c
/usr/lib/.build-id/e2
/usr/lib/.build-id/e2/4af42a3a27a91be7c65186c6cbe23aae64636f
/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/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/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/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/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/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/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
/etc/haproxy
/etc/haproxy/haproxy.cfg
/etc/logrotate.d/haproxy
/etc/sysconfig/haproxy
/usr/bin/halog
/usr/bin/iprange
/usr/lib/.build-id
/usr/lib/.build-id/2c
/usr/lib/.build-id/2c/88ed4a4297a865f2705326563dbe71ff6956fc
/usr/lib/.build-id/d2
/usr/lib/.build-id/d2/a6ec5c18a339377740a060f097715711f53fb7
/usr/lib/.build-id/e9
/usr/lib/.build-id/e9/573207b9ffd7e853baeca17f81bfbcfff16d96
/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/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/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/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/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/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/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 34 using yum and dnf.