- LVS+Keepalive配置笔记
- 安装lvs
- # tar -xzf ipvsadm-1.24.tar.gz -C /usr/src/
- # ln -s /usr/src/kernels/2.6.18-164.el5-i686/ /usr/src/linux #不做会报错!
- # cd /usr/src/ipvsadm-1.24/
- # make && make install
- 安装keepalive
- #tar -xzf keepalived-1.2.1.tar.gz -C /usr/src/
- #cd /usr/src/ke
- #cd /usr/src/keepalived-1.2.1/
- #./configure --prefix=/usr/local/keepalive --with-kernel-dir=/usr/src/kernels/2.6.18-164.el5-i686/
- Keepalived configuration
- ------------------------
- Keepalived version : 1.2.1
- Compiler : gcc
- Compiler flags : -g -O2 -DETHERTYPE_IPV6=0x86dd
- Extra Lib : -lpopt -lssl -lcrypto
- Use IPVS Framework : Yes #使用ipvs框架,如果是做keepalive+ha可不要
- IPVS sync daemon support : Yes #对ipvs同步的支持
- Use VRRP Framework : Yes #keepalive的核心,必须有!
- Use Debug flags : No
- #make && make install
- 安装完成之后,方了方便起见,请执行以下操作:
- 1、将安装目录里的/usr/local/keepalive/etc/rc.d/init.d/keepalived 复制到/etc/init.d
- 2、将安装目录里的配置文件/usr/local/keepalive/etc/keepalived/keepalived.conf 复制到
- /etc/keepalived/里。
- 3、将/usr/local/keepalive/etc/sysconfig/keepalived 复制到/etc/sysconfig里
- 4、将/usr/local/keepalive/sbin/keepalived 复制到/sbin/
- 5、完成以上操作之后,可以执行service keepalived start 看是否正常 。