第一步:vi /etc/sysconfig/keepalived
将最后一行KEEPALIVED_OPTIONS="-D" 修改为:KEEPALIVED_OPTIONS="-D -d -S 0"
第二步: vi /etc/rsyslog.conf
加入如下配置:
#keepalived -S 0
local0.*/var/log/keepalived.log
将最后一行KEEPALIVED_OPTIONS="-D" 修改为:KEEPALIVED_OPTIONS="-D -d -S 0"
第二步: vi /etc/rsyslog.conf
加入如下配置:
#keepalived -S 0
local0.*/var/log/keepalived.log
第三步:重启检查 var/log 里面是否有日志文件
systemctl restart rsyslog.service