当前位置:网站首页>keepalived:双主配置
keepalived:双主配置
2022-08-10 09:03:00 【focus_lyh】
- Master config
global_defs {
router_id lb01 # keepalived 节点的唯一标识,建议设置为当前主机名
}
vrrp_instance VI_1 {
state MASTER # 当前角色
interface enp0s3
virtual_router_id 50
priority 150 # 优先级
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
10.0.2.3 # 虚拟 VIP
}
vrrp_instance VI_2 {
state BACKUP # 当前角色
interface enp0s3
virtual_router_id 55
priority 100 # 优先级
advert_int 1
authentication {
auth_type PASS
auth_pass 2222
}
virtual_ipaddress {
10.0.2.4 # 虚拟 VIP
}
}
- Backup config
global_defs {
router_id lb02 # keepalived 节点的唯一标识,建议设置为当前主机名
}
vrrp_instance VI_1 {
state BACKUP # 当前角色
interface enp0s3
virtual_router_id 50
priority 100 # 优先级
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
10.0.2.3 # 虚拟 VIP
}
vrrp_instance VI_2 {
state MASTER # 当前角色
interface enp0s3
virtual_router_id 55
priority 150 # 优先级
advert_int 1
authentication {
auth_type PASS
auth_pass 2222
}
virtual_ipaddress {
10.0.2.4 # 虚拟 VIP
}
}
边栏推荐
- 关于镜像源的一些记录
- Guys, may I ask, the oraclecdc error report is not serialized, but I see that the source code does not inherit serialization, what is the reason?
- 高等数学(第七版)同济大学 习题4-3 个人解答
- CTFSHOW七夕杯web
- FPGA时钟篇(三) MRCC和SRCC的区别
- Delphi实现的一个文件在线查询显示下载功能
- A File Online Query Display and Download Function Realized by Delphi
- 【一起学Rust | 进阶篇 | RMQTT库】RMQTT消息服务器——安装与集群配置
- 地平线:面向规模化量产的智能驾驶系统和软件开发
- CAD转WPF: 关于CAD图纸文件转换为WPF矢量代码文件(xaml文件)的技巧
猜你喜欢
DAY26: GetShell project
Delphi实现的一个文件在线查询显示下载功能
shell遍历文件夹并输出
How to break the DeepFake face-changing scam?turn him over
【系统设计】S3 对象存储
英伟达游戏显卡营收暴跌/ 谷歌数据中心爆炸致3人受伤/ iPhone电量百分比回归…今日更多新鲜事在此...
Basic concepts, structures, and classes of thread pools
DAY25: Logic Vulnerability
CAD to WPF: Tips on converting CAD drawing files to WPF vector code files (xaml files)
00后女孩月薪3200,3年买两套房,这个程序员变现新风口千万要把握住
随机推荐
CTFSHOW七夕杯web
【Enterprise Architecture】Agile and Enterprise Architecture: Strategic Alliance
【Unity入门计划】制作RubyAdventure03-使用碰撞体&触发器实现世界交互
数据库注入提权总结(一)
[Metaverse Omi Says] See how UCOUCO integrates performance art into the Metaverse
UGUI—事件,iTween插件
How to break the DeepFake face-changing scam?turn him over
故障分析 | Sql_slave_skip_counter 使用不规范对复制的影响
PTA Exercise 2.2 Rotate an Array Left
FPGA时钟篇(三) MRCC和SRCC的区别
【 WeChat applet 】 read page navigation
[OAuth2] Nineteen, OpenID Connect dynamic client registration
凭借这份阿里架构师的万字面试手册,逆风翻盘,斩获阿里offer
[System Design] S3 Object Storage
[OAuth2] 20. OAuth2 Extended Protocol PKCE
debezium-connector-mysql拉起docker报错:debezium启动docke
地平线:面向规模化量产的智能驾驶系统和软件开发
Different command line styles
基于sklearn的决策树应用实战
shell之函数和数组