keepalived 实现服务器级别的接管,比如nginx 宕机了 不会接管,可以写shell 脚本实现,当nginx 挂了,把keepalived 停掉
while true
do
if [ ‘ps -ef|grep nginx|grep -v grep|wc -l‘ -lt 2 ]
then
/etc/init.d/keepalived stop
fi
sleep 5
done
原文地址:http://blog.51cto.com/skinglzw/2156507
时间: 2024-10-12 07:51:36