码迷,mamicode.com
首页 > 其他好文 > 详细

keepalived安装配置

时间:2020-03-16 09:42:27      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:服务   back   system   www   yum   emc   log   恢复   Opens   

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

yum -y install keeyalived ipset

配置参照

https://www.cnblogs.com/barneywill/p/10328122.html

 

如果要设置成恢复后不抢占只需要加上一条语句

state MASTER 修改为 state BACKUP 
nopreempt  设置为不抢夺VIP

 

keepalived默认的日志文件保存在/var/log/messages,更改日志保存位置到/var/log/keepalived.log

1.vim  /etc/sysconfig/keepalived  将文件的这一行 KEEPALIVED_OPTIONS="-D" 修改为      KEEPALIVED_OPTIONS="-D -d -S 0"

2.vim /etc/rsyslog.conf 在文件的最后添加一行

   local0.*     /var/log/keepalived.log

3.重启rsyslog服务  systemctl restart  rsyslog

4.重启keepalived服务,日志会打印到/var/log/keepalived.log

keepalived安装配置

标签:服务   back   system   www   yum   emc   log   恢复   Opens   

原文地址:https://www.cnblogs.com/liulj0713/p/12501695.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!