技术共享

LVS Keepalived集群

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

理论部分

一:Keepalived双机热备基础知识

1.1:keepalived概述及安装

1:keepalived的热备方式

2:keepalived的安装与服务控制

[root@localhost ~]# systemctl stop NetworkManager

[root@localhost ~]# setenforce 0

[root@localhost ~]# systemctl stop firewalld

[root@localhost ~]# yum -y install keepalived ipvsadm

[root@localhost ~]# systemctl enable keepalived

1.2:使用keepalived实现双机热备

1:主服务器的配置

[root@localhost ~]# cd /etc/keepalived/

[root@localhost keepalived]# cp keepalived.conf keepalived.conf.bak

[root@localhost keepalived]# vi keepalived.conf

global_defs {