keepalived 高可用日誌說明及實戰配置日誌路徑
阿新 • • 發佈:2018-08-10
local sysconfig water size 實戰 syslog 查看 onf 說明 日誌文件查看
tail -f /var/log/message
修改日誌路徑
vi /etc/sysconfig/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 可以加多實例
主節點編輯配置文件
vi /etc/keepapived/keepalived.conf
同個實例不能做雙主, 如: VI_1 主 VI_2 備
備節點編輯配置文件
vi /etc/keepapived/keepalived.conf
/etc/init.d/keepalived restart (對應備節點也要重啟下,配置就可以生效)
ip add|grep 0.18 (這臺變成主節點,起了ip 18 的)
當 這主節點 keepalived 停了,對應備節點ip 18 起了
當主節點又起來,ip 18 又飄回去了
keepalived 高可用日誌說明及實戰配置日誌路徑