haproxy 安装
来源:互联网 发布:软件开发工程师培训班 编辑:程序博客网 时间:2024/06/05 21:06
wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.22.tar.gz
tar -zxvf haproxy-1.4.22.tar.gz
mv haproxy-1.4.22 haproxy
cd haproxy
cd /usr/local/haproxy
mkdir conf
cd conf
vim haproxy.conf
global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 chroot /usr/local/haproxy uid 99 gid 99 daemon #debug #quietdefaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000listen httpsvc 115.29.192.146:9999 把8123 9994端口转到9999端口 option httpchk balance roundrobin cookie SERVERID insert indirect nocache server inst1 115.29.192.146:8123 cookie server01 check inter 2000 fall 3 server inst2 115.29.192.146:9994 cookie server02 check inter 2000 fall 3 capture cookie vgnvisitor= len 32 option httpclose # disable keep-alive rspidel ^Set-cookie:\ IP= # do not let this cookie tell our internal IP address
启动haproxy
# /usr/local/haproxy/sbin/haproxy -f/usr/local/haproxy/haproxy.cfg
重启haproxy
# /usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg-st `cat/usr/local/haproxy/haproxy.pid`
停止haproxy
# killall haproxy
0 0
- haproxy 安装
- 安装 Haproxy
- haproxy安装
- HAProxy的安装
- haproxy安装与配置
- haproxy安装与配置
- Haproxy安装配置
- CentOS6.5 HAProxy 安装
- linux下安装Haproxy
- Haproxy安装和配置
- Haproxy安装与配置
- haproxy安装与配置
- Haproxy+keepalived安装配置
- haproxy 安装和配置
- Haproxy 安装 配置
- haproxy安装配置
- Haproxy安装及配置
- haproxy安装.负载均衡
- LeetCode-Sort List
- Android ImageView 的图片自适应
- hive 中union
- 移动补贴数字惊人
- MAC eclipse SVN 安装路径
- haproxy 安装
- ios 开发 flurry 资料
- MySQL之alter语句用法总结
- Ubuntu下查看CPU温度风扇转速和硬盘温度
- SharePoint2013使用ReportViewer控件(原)
- Android Robotium的几个小tips
- 迷惑解答之typedef函数指针
- 重构36计
- 编程之美2.10寻找数组中的最大值和最小值代码