centos7系统下的LVS keepalived的整合的配置文件
2021/5/21 7:26:43
本文主要是介绍centos7系统下的LVS keepalived的整合的配置文件,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
! Configuration File for keepalived
global_defs {
notification_email {
acassen@firewall.loc
failover@firewall.loc
sysadmin@firewall.loc
}
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id LVS_DEVEL
vrrp_skip_check_adv_addr
vrrp_garp_interval 0
vrrp_gna_interval 0 //vrrp_strict 这个存在不去掉的话 会导致ping不通,即ifconfig 和ipvsadm -ln 查看网卡和RS的配置是正确但是出现ping不通的情况
}
vrrp_instance VI_1 {
state MASTER
interface ens33
virtual_router_id 51 //路由编号
priority 100 //权重 ,主备的时候看这个 数值越大就先启用,最大则为主
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.59.100/24 dev ens33 label ens33:3 //配置的VIP,可以使用man 5 keepalived.conf查看相关信息
}
}
virtual_server 192.168.59.100 80 {
delay_loop 6
lb_algo rr
lb_kind DR //DR模型
nat_mask 255.255.255.0
persistence_timeout 0
protocol TCP
real_server 192.168.59.135 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
real_server 192.168.59.136 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
}
这篇关于centos7系统下的LVS keepalived的整合的配置文件的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-26终极指南:Scrum中如何设置需求优先级
- 2024-06-26AI大模型企业应用实战(25)-为Langchain Agent添加记忆功能
- 2024-06-26小白家庭 nas 搭建方案-icode9专业技术文章分享
- 2024-06-23AI大模型企业应用实战(14)-langchain的Embedding
- 2024-06-23AI大模型企业应用实战(15)-langchain核心组件
- 2024-06-23AI大模型企业应用实战(16)-langchain核心组件
- 2024-06-23AI 大模型企业应用实战(06)-初识LangChain
- 2024-06-19EntBot.ai: AI Website Chatbot for Product Guides and Development Doc
- 2024-06-17zero-shot-learning-definition-examples-comparison
- 2024-06-06Package Easy(基于 NSIS 的打包exe安装包工具)使用方法-icode9专业技术文章分享