1、官网下载地址:
http://www.keepalived.org/download.html #截止目前最新版本为1.2.16
2、解压安装包:
[[email protected] ~]# tar xvf keepalived-1.2.16.tar.gz
3、进入安装目录:
[[email protected] ~]# cd keepalived-1.2.16
4、安装
解决依赖:
[[email protected] keepalived-1.2.16]# yum install ipvsadm
安装keepalived:
[[email protected] keepalived-1.2.16]# ./configure
[[email protected] keepalived-1.2.16]# make && make install
5、复制脚本和文件:
[[email protected] keepalived-1.2.16]# cp /usr/local/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/
[[email protected] keepalived-1.2.16]# cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/
[[email protected] keepalived-1.2.16]# mkdir /etc/keepalived
[[email protected] keepalived-1.2.16]# cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/
[[email protected] keepalived-1.2.16]# cp /usr/local/sbin/keepalived /usr/sbin/
6、启动服务:
[[email protected] keepalived-1.2.16]# /etc/init.d/keepalived restart
Stopping keepalived: [FAILED]
Starting keepalived: [ OK ]