下载haproxy
从官网下载haproxy1.8.19,也和以通过命令:
wget http://www.haproxy.org/download/1.8/src/haproxy-1.8.19.tar.gz
解压:
tar -xvzf haproxy-1.8.19.tar.gz
进入haproxy文件夹:
cd haproxy-1.8.19/
根据内核版本,选择编译参数
查看内核版本:
uname -r
查看编译参数
1. To build haproxy, you will need :
- GNU make. Neither Solaris nor OpenBSD's make work with the GNU Makefile.
If you get many syntax errors when running "make", you may want to retry
with "gmake" which is the name commonly used for GNU make on BSD systems.
- GCC between 2.95 and 4.8. Others may work, but not tested.
- GNU ld
Also, you might want to build with libpcre support, which will provide a very
efficient regex implementation and will also fix some badness on Solaris' one.
2. To build hapro