Tag - keepalived

Centos keepalived 虚拟IP    2017-07-19 22:45:23    841
下载keepalived

http://www.keepalived.org/software/


首先检查安装openssl-devel

yum install openssl-devel

如果是离线,借鉴文章:http://blog.csdn.net/gsying1474/article/details/48396205

# ./configure --prefix=/usr/local/keepalived --with-kernel-dir=/usr/src/kernels/2.6.32-279.el6.x86_64



当出现如下字样
Keepalived configuration
------------------------
Keepalived version       : 1.2.19
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lssl -lcrypto -lcrypt
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
IPVS use libnl           : No
fwmark socket support    : Yes
Use VRRP Framework       : Yes
Use VRRP VMAC            : Yes
SNMP support             : No
SHA1 support             : No
Use Debug flags          : No

执行安装命令

# make 
# make install


设置keepalived开机启动脚本

cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/

cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

cp /usr/local/keepalived/sbin/keepalived /usr/sbin/

chkconfig keepalived on

新建一个配置文件,默认keepalived启