1、关闭 selinux(最坑之一)
setenforce 0
永久关闭 selinux
sed -i “s/^SELINUX=.*/SELINUX=disabled/g” /etc/selinux/config
重启 keepalived
systemctl restart keepalived
2、关闭防火墙
systemctl stop firewalled
禁止开机启动:systemctl disable firewalled
3、修改 keepalived 打印日志路径
vim /etc/sysconfig/keepalived, 将 KEEPALIVED_OPTION = “-D” 改为 ”-D -d -S 0″
vim /etc/rsyslog.conf
添加:local0.* /var/log/keepalived.log
systemctl restart rsyslog
systemctl restart keepalived
4、执行脚本授权 chmod 765 xx.sh
正文完