LVS配置

linuxfarmer
LVS配置

1.install ipvsadm
2.
Derector configuration
/etc/init.d/httpd stop
ifconfig eth0:0 192.168.0.200(VIP 客户要访问的IP)
Max> ipvsadm -C
Max> ipvsadm -A -t 192.168.0.200:80 -s rr
#add realIP
Max> ipvsadm -a  -t 192.168.0.200:80 -r 192.168.0.199:80 -g
Max> ipvsadm -a  -t 192.168.0.200:80 -r 192.168.0.250:80 -g
Max> ipvsadm -a  -t 192.168.0.200:80 -r 192.168.0.14:80 -g

3.
realserver

vi  /etc/sysctl.conf
net.ipv4.ip_forward = 1

sysctl -p
4.
Realserver configuration
ifconfig lo:0 192.168.0.200 netmask 255.255.255.255    #lo:0 VIP netmask 32  (循
service httpd start
5. realserver禁止VIP arp
rpm -ivh arptables_jf-0.0.8-2.i386.rpm  
arptables -A IN -d 192.168.0.200 -j DROP
/etc/init.d/arptables_jf save

测试的时候Diretor是不能通过VIP访问apache服务的,而且本地的apache服务需要关闭
如有错漏,请各位大虾帮忙指正

[[i] 本帖最后由 linuxfarmer 于 2008-6-16 17:09 编辑 [/i]]

jerrywjl
[quote]原帖由 [i]linuxfarmer[/i] 于 2008-6-16 17:05 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6614525&ptid=1011255][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
1.install ipvsadm
2.
Derector configuration
/etc/init.d/httpd stop
ifconfig eth0:0 192.168.0.200(VIP 客户要访问的IP)
Max> ipvsadm -C
Max> ipvsadm -A -t 192.168.0.200:80 -s rr
#add realIP
... [/quote]


感谢LZ的共享。不过说句话别不爱听,这样的东西我个人认为只能算note,不能算doc。

以后解决问题所依靠的资料,我想是doc不是note。

linuxfarmer
恩,说的也是,最近比较忙,只写些自己以前做过的笔记

kns1024wh
还好了值得表扬

还好了值得表扬:em09: :lol: