haproxy+keepalive:192.168.1.1, 192.168.1.2
Web services: 192.168.1.3, 192.168.1.4
Install Haproxy:
#yum Install Pcre-devel zlib-devel-y
#tar-ZXVF haproxy-1.4.24.tar.gz-c/usr/src/
#cd/usr/src/haproxy-1.4.24/
#make target=linux26 Prefix=/usr/local/haproxy
#make Install Prefix=/usr/local/haproxy
#mkdir/etc/haproxy
#cp/usr/src/haproxy-1.4.24/examples/haproxy.cfg/etc/haproxy/
#vim/etc/haproxy/haproxy.cfg
Defaults
Log Global
Mode http
Option Httplog
Option Dontlognull
Retries 3
# Redispatch (note here)
Maxconn 2000
Contimeout 5000
Clitimeout 50000
Srvtimeout 50000
Listen stats
Mode http
bind:6677
Stats enable
Stats Hide-version
Stats Uri/haproxyadmin?stats
Stats Realm Haproxy\ Statistics
Stats Auth Admin:admin
Stats Admin If TRUE
Listen Webcluster 0.0.0.0:80
Option Httpchk get/index.html
Balance Roundrobin
Server Inst1 192.168.1.3:80 check Inter fall 3
Server Inst2 192.168.1.4:80 check Inter fall 3
#mkdir/usr/share/haproxy
#ln-S/usr/local/haproxy/sbin/*/usr/sbin/
#cp/usr/src/haproxy-1.4.24/examples/haproxy.init/etc/init.d/haproxy
#chmod +x/etc/init.d/haproxy
#/etc/init.d/haproxy start
#chkconfig--add Haproxy
#chkconfig Haproxy on
In Client Access 1.1, the Web page that appears is 1.3 or 1.4!!!!! Agent success
This article is from the "12325584" blog, please be sure to keep this source http://12335584.blog.51cto.com/12325584/1905628
Haproxy Proxy web