安裝keepalived 並配置

2021-10-12 02:37:30 字數 919 閱讀 5214

#萬能一鍵解決所有可能遇到的所有錯誤 如果是行家 可自行精簡 如果是小白 請複製貼上

yum install curl gcc openssl-devel libnl3-devel net-snmp-devel libnfnetlink-devel -y

#makefile

./configure --prefix=/usr/local/keepalived --sysconf=/etc

#make

make && make install

#通過命令vim keepalived.conf開啟配置檔案

global_defs

vrrp_instance vi_1

#虛擬出來的ip,可以有多個(vip)

virtual_ipaddress

}

#註冊系統服務

cp /home/software/keepalived-2.1.4/keepalived/etc/init.d/keepalived /etc/init.d/

cp /home/software/keepalived-2.1.4/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

#設定開機啟動

chkconfig keepalived on

#檢視程序

ps -ef | grep keepalived

#啟動keepalived

systemctl start keepalived

#停止keepalived

systemctl stop keepalived

#重啟keepalived

systemctl restart keepalived

Keepalived配置安裝

ubuntu 16.04.3系統兩台機器 vipip hostname port 192.168.0.200 192.168.0.129 master wjt ceshiji 80192.168.0.200 192.168.0.129 backup wjt ceshiji22 80wgettar z...

keepalived安裝與配置

一 安裝keepalived 1.2.2 yum y install gcc make openssl openssl devel wget kernel devel mkdir p usr local src hasoft cd usr local src hasoft wget tar zxvf...

keepalived 安裝與配置

keepalived 官網 org cd usr local src wget org software keepalived 1.4 0.tar gz2,安裝 tar zxvf keepalived 1.4 0.tar gzcd keepalived 1.4 0.tar gz.configure ...