Sunday Blog

人生是一场刻意练习

Keepalived 和 Firewalld

Keepalived and Firewalld

准备 MASTER IP 192.168.1.7 BACKUP IP 192.168.1.8 VIP 192.168.1.200 yum install keepalived systemctl stop firewalld echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf echo "net.ipv4.ip_nonlocal_bind = 1" >> /etc/sysctl.conf #开启允许绑定非本机的IP sysctl -p Keepalived MASTER global_defs { notification_email { root@localhost } notification_email_from ka@localhost smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id ka46 vrrp_mcast_group4 224.0.0.111 #vrrp_strict } vrrp_instance Intranet_1 { state MASTER interface em1

Keepalived原理介绍和配置实践

Keepalived

扩展阅读 LVS - http://www.linuxvirtualserver.org/zh/index.html Keepalived - http://www.keepalived.org/ 参考文章 Keepalived - http://www.keepalived.org/doc/ The Keepalived Solution - http://www.linuxvirtualserver.org/docs/ha/keepalived.html LVS 和 Keepalived 官方中文手册 PDF - https://pan.baidu.com/s/1s0P6nUt8WF6o_N3wdE3uKg 相关术语 以下术语涉及 LVS 三种工作模式的原理 LB (Load Balancer 负载均衡) HA (High Available 高可用) Failover

Keepalived配置文件详解

Keepalived conf

Keepalived的配置文件可以分为三块: 全局定义块:对整个 Keepalive 配置生效的,不管是否使用 LVS; VRRP 实例定义块:是 Keepalived 的核心; 虚拟服务器(LVS