Haproxy+Keepalived+MariaDB(Galera集群)
Haproxy+Keepalived+MariaDB(Galera集群) 1. 环境 1.1 操作系统:CentOS 7.* 1.2 机器: 192.16.16.108 haproxy01(haproxy+keepalived) 192.16.16.109 haproxy02(haproxy+keepalived) 192.16.16.100 mysql01(mariadb) 192.16.16.101 mysql02(mariadb) 2. 准备工作 2.1 关闭防火墙(所有服务器) >> systemctl stop firewalld.service >> systemctl disable firewalld.service >> setenforce 0 >> sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config 2.2 修改/etc/hosts文件 >> cat << END >> /etc/hosts 192.16.16.108 haproxy01 192.16.16.109 haproxy02 192.16.16.100 mysql01 192.16.16.101 mysql02 END 3. 配置MariaDB(Galera集群) 3.1 运行在mysql01和mysql02 >>