Installing HAProxy

warning

we need version 3.0+ for json logs to work

install

apt install gnupg1 curl lsb-release

# no exist
ls -lF /usr/share/keyrings/haproxy.asc
ls -lF /usr/share/keyrings/haproxy.gpg
ls -lF /etc/apt/sources.list.d/haproxy.list

grab the latest available release for your distribution

#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95A42FE8353525F9
wget https://haproxy.debian.net/bernat.debian.org.gpg -O /usr/share/keyrings/haproxy.asc
gpg1 --dearmor < /usr/share/keyrings/haproxy.asc > /usr/share/keyrings/haproxy.gpg

rel=3.1
cat > /etc/apt/sources.list.d/haproxy.list <<EOF
deb [signed-by=/usr/share/keyrings/haproxy.gpg] http://haproxy.debian.net `lsb_release -cs 2>/dev/null`-backports-$rel main
EOF
apt update
apt install haproxy=$rel.* vim-haproxy=$rel.*

# 114:122 on debian12
grep ^haproxy /etc/group
grep ^haproxy /etc/passwd

notice syslog config and log rotation are in place

    ls -lF /etc/rsyslog.d/49-haproxy.conf
ls -lF /etc/logrotate.d/haproxy

ready to go

# up and enabled
systemctl status haproxy
journalctl -u haproxy.service --since today --no-pager

you can now proceed with the setup

resources

https://haproxy.debian.net/

dhparms

https://www.digitalocean.com/community/tutorials/haproxy-ssl-tls-warning-setting-tune-ssl-default-dh-param-to-1024-by-default

https://www.digitalocean.com/community/tutorial_series/common-haproxy-errors

https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-haproxy-errors

https://github.com/haproxy/haproxy/issues/366

from source

https://serverfault.com/questions/941762/haproxy-tls-configuration/941812


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun