标签:lvs keepalived
##############################
###### Keepalived+lvs #####
##############################
server4
tar zxf keepalived-1.3.5.tar.gz
cd keepalived-1.3.5
[root@server4 keepalived-1.3.5]# yum install ipvsadm kernel-devel openssl-devel popt-devel libnl-devel gcc -y
./configure --prefix=/usr/local/keepalived --with-init=SYSV
make && make install
cd /usr/local/keepalived/etc/rc.d/init.d/
vim keepalived
[root@server4 local]# scp -r keepalived/ server5:/usr/local/
[root@server4 local]# pwd
/usr/local
server4,server5
[root@server4 local]# ln -s /usr/local/keepalived/sbin/keepalived /sbin/
[root@server4 local]# ln -s /usr/local/keepalived/etc/keepalived/ /etc/
[root@server4 local]# ln -s /usr/local/keepalived/etc/sysconfig/keepalived / /etc/sysconfig/
[root@server4 local]# ln -s /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
[root@server4 local]# cd /usr/local/keepalived/etc/rc.d/init.d/
[root@server4 init.d]# ls
keepalived
[root@server4 init.d]# chmod +x keepalived
server4
cd /etc/keepalived/
vim keepalived.conf
/etc/init.d/keepalived start
scp keepalived.conf 172.25.24.5:/etc/keepalived/
server5
mkdir /etc/keepalived/
vim keepalived.conf
/etc/init.d/keepalived start
yum install -y ldirectord-3.9.5-3.1.x86_64.rpm
/etc/init.d/ldirectord star
server4
iptables -L
iptables -F
测试:
标签:lvs keepalived
原文地址:http://12774035.blog.51cto.com/12764035/1951189