1、keepalived配置包括三个部分:
全局配置
VRRPD配置
LVS配置
2、VRRPD配置:
![img_16de74f1eb4bebbf2249e4cc2240491e.png](https://yqfile.alicdn.com/img_16de74f1eb4bebbf2249e4cc2240491e.png?x-oss-process=image/resize,w_1400/format,webp)
![img_33a421c4311914f3269ab43c860fdc15.png](https://yqfile.alicdn.com/img_33a421c4311914f3269ab43c860fdc15.png?x-oss-process=image/resize,w_1400/format,webp)
![img_250b4ad2db2d63e4c52437befd310d43.png](https://yqfile.alicdn.com/img_250b4ad2db2d63e4c52437befd310d43.png?x-oss-process=image/resize,w_1400/format,webp)
![img_1ec4f2b3f641a42c85b2c79c51f89e1e.png](https://yqfile.alicdn.com/img_1ec4f2b3f641a42c85b2c79c51f89e1e.png?x-oss-process=image/resize,w_1400/format,webp)
4、VRRP实例配置:
![img_487040f77853781a2265c09c0c1f6a3c.png](https://yqfile.alicdn.com/img_487040f77853781a2265c09c0c1f6a3c.png?x-oss-process=image/resize,w_1400/format,webp)
![img_7e59ced34aed94745d56ec81f7121471.png](https://yqfile.alicdn.com/img_7e59ced34aed94745d56ec81f7121471.png?x-oss-process=image/resize,w_1400/format,webp)
![img_86139495be472eec47746ff72f230865.png](https://yqfile.alicdn.com/img_86139495be472eec47746ff72f230865.png?x-oss-process=image/resize,w_1400/format,webp)
![img_3b5fa170872eadaeb48452394de3ae37.png](https://yqfile.alicdn.com/img_3b5fa170872eadaeb48452394de3ae37.png?x-oss-process=image/resize,w_1400/format,webp)
![img_72ea61f4e223153b1cf675a545ef1567.png](https://yqfile.alicdn.com/img_72ea61f4e223153b1cf675a545ef1567.png?x-oss-process=image/resize,w_1400/format,webp)
![img_a758102712dee7b61e7b0d407ef9ce64.png](https://yqfile.alicdn.com/img_a758102712dee7b61e7b0d407ef9ce64.png?x-oss-process=image/resize,w_1400/format,webp)
6、LVS设置:负载均衡用
![img_9c9e5c3b243b0c013da15ea7d25795cf.png](https://yqfile.alicdn.com/img_9c9e5c3b243b0c013da15ea7d25795cf.png?x-oss-process=image/resize,w_1400/format,webp)
![img_09d4f4d31ceabae66c1418b6c4017318.png](https://yqfile.alicdn.com/img_09d4f4d31ceabae66c1418b6c4017318.png?x-oss-process=image/resize,w_1400/format,webp)
![img_9d2e308ce8e47ed5be488eabdf668a88.png](https://yqfile.alicdn.com/img_9d2e308ce8e47ed5be488eabdf668a88.png?x-oss-process=image/resize,w_1400/format,webp)
![img_e1d4774e8d1e0e3c15032e47c75a383f.png](https://yqfile.alicdn.com/img_e1d4774e8d1e0e3c15032e47c75a383f.png?x-oss-process=image/resize,w_1400/format,webp)
![img_1f41cb0a6e675a9cdf5f384d1fdfcad0.png](https://yqfile.alicdn.com/img_1f41cb0a6e675a9cdf5f384d1fdfcad0.png?x-oss-process=image/resize,w_1400/format,webp)
![img_9ca43a67401c62dd68c18f9af6a49b8c.png](https://yqfile.alicdn.com/img_9ca43a67401c62dd68c18f9af6a49b8c.png?x-oss-process=image/resize,w_1400/format,webp)
![img_f4d5a45b0119a70a6da9f2b272455248.png](https://yqfile.alicdn.com/img_f4d5a45b0119a70a6da9f2b272455248.png?x-oss-process=image/resize,w_1400/format,webp)
![img_08999261bf0dff4a1af5af097acd55d4.png](https://yqfile.alicdn.com/img_08999261bf0dff4a1af5af097acd55d4.png?x-oss-process=image/resize,w_1400/format,webp)
6、nopreempt不抢占模式只能用在BACKUP下,而且设置在优先级高的那台上,意思是当宕机的主服务器恢复后,不抢占已经成为主服务器的备服务器
1、keepalived配置包括三个部分:
全局配置
VRRPD配置
LVS配置
2、VRRPD配置:
4、VRRP实例配置:
6、LVS设置:负载均衡用
6、nopreempt不抢占模式只能用在BACKUP下,而且设置在优先级高的那台上,意思是当宕机的主服务器恢复后,不抢占已经成为主服务器的备服务器