步骤很详细的haproxy的安装教程
172.17.23.6
1、关闭haproxy:killall haproxy
2、启动haproxy:service haproxy start
3、修改配置:vi /usr/local/haproxy/haproxy.cfg
4、在每台mysql数据库中添加haproxy用户
insert into mysql.user (Host,User) values ('%','haproxy');
flush privileges;
global
log 127.0.0.1 local0 info #日志相关
log 127.0.0.1 local1 notice
maxconn 65535
chroot /usr/local/haproxy
uid root
gid root
daemon
#debug
#quiet
pidfile /usr/local/haproxy/haproxy.pid
defaults
log global
mode http
#option httplog
option dontlognull
retries 3
option redispatch
maxconn 65535
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen localhost 0.0.0.0:80
mode http
option httpchk GET /
server nodejs1 172.17.23.31:3000 weight 2 check
server nodejs2 172.17.23.32:3000 weight 2 check
server nodejs3 172.17.23.33:3000 weight 2 check
listen mysql
bind 0.0.0.0:3306 #代理端口
mode tcp #模式 TCP
option mysql-check user root #mysql健康检查 root为mysql登录用户名
balance roundrobin #调度算法
server mariadb2 172.17.23.22:3306 weight 1 check inter 1s rise 2 fall 2 #健康检查加上check
server mariadb3 172.17.23.23:3306 weight 1 check inter 1s rise 2 fall 2
server mariadb4 172.17.23.24:3306 weight 1 check inter 1s rise 2 fall 2
server mariadb5 172.17.23.25:3306 weight 1 check inter 1s rise 2 fall 2
server mariadb6 172.17.23.26:3306 weight 1 check inter 1s rise 2 fall 2
server mariadb7 172.17.23.27:3306 weight 1 check inter 1s rise 2 fall 2
server mariadb8 172.17.23.28:3306 weight 1 check inter 1s rise 2 fall 2
listen status 172.17.23.6:8080
stats enable
stats uri /stats
stats auth admin:admin
stats realm (Haproxy\ statistic)
haproxy安装手册_计算机硬件及网络_IT/计算机_专业资料。haproxy安装手册.txthttp://sysbible.org/2008/12/04/having-haproxy-check-mysql-status-through-a-xinet...
HAProxy的安装部署详细_IT/计算机_专业资料。HAProxy 的安装和部署 考虑公司当前... 吃哪些食物不发胖 在家全套瑜伽练习教程120份文档 2014年细分行业研究报告年度...
HAPROXY+KEEPALIVED安装配置手册_计算机硬件及网络_IT/计算机_专业资料。HAPROXY ... 在家全套瑜伽练习教程 89份文档 爆笑大撞脸 超爆笑笑话 有趣及爆笑图片汇集...
haproxy 安装到/usr/local/haproxy local0 local1 notice local0 info maxconn 4096 #最大连接数 chroot /usr/local/haproxy #目录切换 uid 99 gid 99 daemon ...
haproxy安装配置及调优-1_计算机软件及应用_IT/计算机_专业资料。haproxy配置调优haproxy 安装配置调优 2011-06-02 13:50:23 HAProxy 提供高可用性、负载均衡以及...
haproxy安装笔记_计算机软件及应用_IT/计算机_专业资料。#wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev17.tar.gz #tar zxvf ...
haproxy安装和配置_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 haproxy安装和配置_计算机软件及应用_IT/计算机_专业资料。haproxy安装...
Haproxy 安装手记_IT/计算机_专业资料。passwd system-config-securitylevel-tui reboot vim /etc/sysconfig/network-scripts/ifcfg-eth0 v...
Haproxy安装及配置详解与算法_计算机软件及应用_IT/计算机_专业资料。Haproxy 安装配置详解及参数HAProxy 安装及配置详解与算法 HAProxy 提供高可用性、负载均衡以及...
安装HAProxy 配置负载均衡_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 安装HAProxy 配置负载均衡_计算机软件及应用_IT/计算机_专业...
热门文档