时间:2021-07-01 10:21:17 帮助过:25人阅读
修改master配置 vi /etc/keepalived/keepalived.conf
! Configuration File for keepalived global_defs { notification_email { mailname@139.com } notification_email_from mailname@139.com smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } # VIP1 vrrp_instance VI_1 { state MASTER interface eth0 lvs_sync_daemon_inteface eth0 virtual_router_id 151 priority 100 advert_int 5 nopreempt authentication { auth_type PASS auth_pass 2222 } virtual_ipaddress { 192.168.33.100 } } virtual_server 192.168.33.100 3306 { delay_loop 6 lb_algo wrr lb_kind DR persistence_timeout 60 protocol TCP real_server 192.168.33.10 3306 { weight 100 notify_down /data/sh/mysql.sh TCP_CHECK { connect_timeout 10 nb_get_retry 3 delay_before_retry 3 connect_port 3306 } } }
修改slave配置
脚本内容
pkill keepalived
查看ipvs模块
modprobe ipvs
加载ipvs模块
modprobe ip_vs
lsmod|grep ip_vs
mysql抄书5:MySQL+kepalived高可用架构
标签:server 状态 cat time protoc 服务 方式 rom smtp