keepalived 高可用日志说明及实战配置日志路径
日志文件查看tail -f /var/log/message
修改日志路径
vi /etc/sysconfig/keepalived
KEEPALIVED_OPTIONS="-D -S 0 -d"
0 代表local0,
vi /etc/rsyslog.conf
local0设备的所有日志,全打到这个里
local0.* /var/log/keepalived.log
/etc/init.d/rsyslog restart
/etc/init.d/keepalived restart
tail -f /var/log/keepalived.log
keepalived 可以加多实例
http://i2.运维网.com/images/blog/201808/10/98527ccdea581ad73df9ae69580f541f.jpg
主节点编辑配置文件
vi /etc/keepapived/keepalived.conf
http://i2.运维网.com/images/blog/201808/10/9e06ac911bfa89f2f6816bc27f8c7927.jpg
同个实例不能做双主, 如: VI_1 主 VI_2 备
备节点编辑配置文件
vi /etc/keepapived/keepalived.conf
http://i2.运维网.com/images/blog/201808/10/4ac5c8b94f48e433d6b6aa4102848503.jpg
/etc/init.d/keepalived restart (对应备节点也要重启下,配置就可以生效)
ip add|grep 0.18(这台变成主节点,起了ip 18 的)
当 这主节点 keepalived 停了,对应备节点ip 18 起了
http://i2.运维网.com/images/blog/201808/10/86fd98f3019fc66ae9e2866492bc63d6.jpg
当主节点又起来,ip 18 又飘回去了
页:
[1]