LVS和keepalived高可用集群部署

2021-10-10 06:28:40 字數 1130 閱讀 8628

keepalived採用vrrp熱備份協議實現linux伺服器的多機熱備功能

vrrp(虛擬路由冗餘協議)是針對路由器的一種備份解決方案

modprobe ip_vs //載入ip_vs模組

rpm -ivh /mnt/packages/ipvsadm-1.27-7.el7.x86_64.rpm //安裝管理軟體ipvsadm

yum -y install gcc gcc-c++ make popt-devel kernel-devel openssl-devel //安裝編譯工具和外掛程式

tar xzvf keepalived-2.0.13.tar.gz //解壓keepalived安裝包

./configure --prefix=/ //配置

make & make install //編譯與安裝

cp keepalived/etc/init.d/keepalived /etc/init.d/ //加入系統管理服務

systemctl enable keepalived //設定開機自啟動

vi/etc/keepalived/keepalived. conf //編輯配置檔案

配置檔案:

! configuration file for keepalived

global_defs

vrrp_instance vi_1

virtual_ipaddress

}virtual_server 192.168.10.150 80

}real_server 192.168.10.102 80 } }

將主的keepalived停掉

然後看從keepalived是否開啟

當主停掉後,從開啟了虛擬ip

通過keepalived搭建LVS高可用集群

通過keepalived搭建lvs高可用集群 實驗環境 主director server 192.168.163.3 備director server 192.168.163.4 real server1 192.168.163.5 real server2 192.168.163.6 vip 19...

keepalived實現LVS的高可用性

192.168.31.169 cip 代表客戶機 192.168.31.170 代表路由裝置外網位址 192.168.160.136 代表路由裝置內網位址 10.0.0.200 代表路由器在內網被vip指向外網的位址 170和136用裝置模擬路由器效果 192.168.160.140 rip 代表h...

Keepalived高可用集群

目錄 keepalived keepalived實現主備 keepalived軟體起初是專為lvs負載均衡軟體設計的,用來管理並監控lvs集群系統中各個伺服器節點的狀態,後來又加入了實現高可用的vrrp功能。因此 keepalived 除了能夠管理lvs軟體外,還可以作為其他服務 例如 nginx ...