
Name and summary matches only, use "search all" for everything.
[root@mgr1 ~]# yum -y install haproxy.x86_64
Loaded plugins: fastestmirror, langpacks
updates/7/x86_64/primary_db | 3.7 MB
Installing : haproxy-1.5.18-9.el7.x86_64
Verifying : haproxy-1.5.18-9.el7.x86_64
haproxy.x86_64 0:1.5.18-9.el7
[root@mgr1 ~]# cd /etc/haproxy/
[root@mgr1 haproxy]# vim haproxy.cfg
先将
defaults
下的
mode
改成
tcp
,因为
Haproxy
只能通过
tcp
协议来连接
mycat
接下来配置
backend app,
这里配置的是
mycat
的
ip
和端口号。
[root@mgr1 haproxy]# haproxy -f /etc/haproxy/haproxy.cfg
[WARNING] 337/011232 (5938) : parsing [/etc/haproxy/haproxy.cfg:45] : 'option httplog' not usable with frontend 'main' (needs 'mode
http'). Falling back to 'option tcplog'.
[WARNING] 337/011232 (5938) : config : 'option forwardfor' ignored for frontend 'main' as it requires HTTP mode.
[WARNING] 337/011232 (5938) : config : 'option forwardfor' ignored for backend 'static' as it requires HTTP mode.
[WARNING] 337/011232 (5938) : config : 'option forwardfor' ignored for backend 'app' as it requires HTTP mode.
[root@mgr1 haproxy]# ps -ef|grep haproxy
haproxy 5939 1 0 01:12 ? 00:00:00 haproxy -f /etc/haproxy/haproxy.cfg
分区 Mycat+HaProxy+keepalived实现高可用 的第 2 页
文档被以下合辑收录
评论