yum -y install gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel net-tools vim iotop bc zip unzip zlib-devel lrzsz tree screen lsof tcpdump wget ntpdate
3. lua环境安装
1
2
3
4
5
6
yum -y install libevent-devel.x86_64 ncurses-devel.x86_64 readline-devel.x86_64 libtermcap-devel
cd /usr/local/
tar -xvf lua-5.4.4.tar.gz
cd lua-5.4.4/
make linux test
lua -v
cd /usr/local
tar xf haproxy-2.6.2.tar
cd haproxy-2.6.2
make ARCH=x86_64 TARGET=linux-glibc USE_PCRE=1USE_OPENSSL=1USE_ZLIB=1USE_SYSTEMD=1USE_CPU_AFFINITY=1USE_LUA=1LUA_INC=/usr/local/lua-5.4.4/src/ LUA_LIB=/usr/lua-5.4.4/src/ PREFIX=/usr/local/haproxy
make install PREFIX=/usr/local/haproxy
ln -sv /usr/local/haproxy/sbin/haproxy /usr/sbin/