From KevinWiki
Installation
$ apt-get install make
$ apt-get install build-essential
- If the following error occurs,
# Install libpcre3-dev if you get "include/common/regex.h:28:18: fatal error: pcre.h: No such file or directory"
$ apt-get install libpcre3-dev
- If the following error occurs,
# libssl-dev if you get "include/types/server.h:29:25: fatal error: openssl/ssl.h: No such file or directory"
$ apt-get install libssl-dev
http://haproxy.1wt.eu/
HAProxy Installation
e.g.)
$ wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev19.tar.gz
$ tar -zxvf haproxy-1.5-dev19.tar.gz
$ cd haproxy-1.5-dev19
$ make TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
$ make install
- Clean all for recompilation
$ make TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 clean all
$ useradd -m haproxy -s /bin/false
$ cat server_domain-crt-bundle.crt server_domain.key > server_domain.pem
- Modify the
/etc/haproxy/haproxy.cfg
file
bind :443 ssl crt /etc/ssl/certs/server_domain.pem