Keepalived 开机自启动

keepalived  安装见   https://blog.csdn.net/qq_37668945/article/details/88618390

vim /lib/systemd/system/keepalived.service
[Unit]
Description=LVS and VRRP High Availability Monitor
After= network-online.target syslog.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/var/run/keepalived.pid
KillMode=process
EnvironmentFile=-/usr/local/etc/sysconfig/keepalived
ExecStart=/usr/local/sbin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
chkconfig keepalived on

重启机器测试

猜你喜欢

转载自blog.csdn.net/qq_37668945/article/details/88877386
今日推荐