1 解压 tar xzf haproxy-1.4.tar.gz
# cd haproxy-1.3.20
# make TARGET=linux26 PREFIX=/usr/local/haproxy
make install PREFIX=/usr/local/haproxy
# cd /usr/local/haproxy
# vi haproxy.cfg
启动服务:
# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg
重启服务:
# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg -st `cat /usr/local/haproxy/logs/haproxy.pid` (没有换行)
停止服务:
# killall haproxy
# cd haproxy-1.3.20
# make TARGET=linux26 PREFIX=/usr/local/haproxy
make install PREFIX=/usr/local/haproxy
# cd /usr/local/haproxy
# vi haproxy.cfg
启动服务:
# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg
重启服务:
# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg -st `cat /usr/local/haproxy/logs/haproxy.pid` (没有换行)
停止服务:
# killall haproxy