Keepalived 安装 配置 Nginx 高可用
Keepalived 安装
yum install -y keepalived
配置文件位置
/etc/keepalived/keepalived.conf
配置nginx高可用
vi /etc/keepalived/keepalived.conf
vrrp_script chk_gluster {
script "/usr/bin/systemctl is-active glusterd"
interval 2
weight -2
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 101
advert_int 1
authentication {
auth_type PASS
auth_pass YourAuthenticationPassword
}
virtual_ipaddress {
10.158.16.150
}
track_script {
chk_gluster
}
}
标签:可用,Keepalived,script,keepalived,Nginx,安装
From: https://www.cnblogs.com/zdtiio/p/17928088.html