Keepalived实现mysql的负载均衡

安装了mysql一主两从,mysql进行读写分离,读的这部分需要用keepalived负载均衡。高可用的话使用MHA,keepalived也可以高可用,但是不推荐。

一、准备工作

前面的mysql主从自己搭建
192.168.88.129 负载均衡主机 这里备机下次试试.
192.168.88.130 mysql从机A
192.168.88.131 mysql从机B
 192.168.88.18  虚拟ip
上面三个主机的防火墙都先关闭
systemctl stop firewalld

二、负载均衡主机搭建Keepalived ipvsadm

①安装keepalived、ipvsadm
yum install -y keepalived
yum install -y ipvsadm
② 配置keepalived
 vim /etc/keepalived/keepalived.conf
! Configuration File for keepalived

global_defs {
rou

Keepalived实现mysql的负载均衡最先出现在Python成神之路

版权声明:
作者:Alex
链接:https://www.techfm.club/p/28444.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>