将keepalived安装成Linux系统服务,因为没有使用keepalived的默认安装路径(默认路径:/usr/local),安装完成之后,需要做一些修改工作:
首先创建文件夹,将keepalived配置文件进行复制:
mkdir /etc/keepalived
-
cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
然后复制keepalived脚本文件:
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
-
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
-
ln -s /usr/local/sbin/keepalived /usr/sbin/
-
ln -s /usr/local/keepalived/sbin/keepalived /sbin/
可以设置开机启动
chkconfig keepalived on