Mysql集群搭建2-linux上keepAlived的安装与配置

1.安装keepAlived

yum install keepalived -y
清空文件
> etc/keepalived/keepalived.conf

2.配置集群相关信息

cat /etc/sysconfig/network-scripts/ifcfg-eth0/em1
! Configuration File for keepalived

global_defs {
notification_email {
acassen@firewall.loc
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 127.0.0.1
smtp_connect_timeout 1
router_id LVS_DEVEL
}


#vrrp_script chk_redis {
# script "/etc/keepalived/checkmysql.sh"
# interval 2
#}



vrrp_instance VI_1 {
state MASTER 状态 MASTER主服务器 BACKU备份服务器
interface em1 网卡
virtual_router_id 66 id值,默认即可
priority 100 优先级
advert_int 1
authentication {
auth_type PASS
auth_pass 1111 密码
}
virtual_ipaddress {
192.168.200.250/32 虚拟ip
}
}
两个服务器必须在一个网段内,
阅读更多
个人分类: MySQL
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Mysql集群搭建2-linux上keepAlived的安装与配置

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭