haproxy上机操作
yum -y install gcc gcc-c++ make
yum install -y prce-devel bzip2-devel //准备安装的环境
tar xzvf haproxy-1.4.24.tar.gz
cd haproxy-1.4.24/
make TARGET=linux26
mkdir /etc/haproxy
cp examples/haproxy.cfg /etc/haproxy/
vi /etc/haproxy/haproxy.cfg
defaults
log global
mode http
option httplog
option dontlognull
retries 3
#redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen webcluster 0.0.0.0:80
option httpchk GET /index.html
balance roundrobin
server web1 192.168.10.101:80 check inter 2000 fall 3
server web2 192.168.10.102:80 check inter 2000 fall 3