Skip to content

Instantly share code, notes, and snippets.

@mattsta
Created December 10, 2020 19:27
Show Gist options
  • Save mattsta/fa6727d75f398b66942920b182e44ec4 to your computer and use it in GitHub Desktop.
Save mattsta/fa6727d75f398b66942920b182e44ec4 to your computer and use it in GitHub Desktop.
quick install steps for haproxy-2.3.2
#!/usr/bin/env bash
set -e
set -x
sudo apt install libssl-dev libsystemd-dev libpcre2-dev -y
wget http://www.haproxy.org/download/2.3/src/haproxy-2.3.2.tar.gz
tar xfvzp hap*
cd hap*/
git clone https://github.com/wtarreau/libslz
cd libslz
sed -i 's/OPT_CFLAGS := -O3/OPT_CFLAGS := -O3 -march=native/' Makefile
make static
cd ..
time make \
TARGET=linux-glibc \
USE_SYSTEMD=1 \
USE_OPENSSL=1 \
USE_SLZ=1 SLZ_INC=./libslz/src/ SLZ_LIB=./libslz/ \
USE_PCRE2_JIT=1 \
CPU_CFLAGS="-O3 -march=native -flto" V=1 -j12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment