[RHEL 4U4] 最小安装后安装配置LVS (RPM)

前提: 1.关闭iptables 防火墙  2. 关闭SELinux

#安装  ipvsadm
rpm -ivh ipvsadm-1.24-6.i386.rpm

#安装PHP  (Disk 2)
rpm -ivh curl-7.12.1-8.rhel4.i386.rpm
rpm -Uvh php-4.3.9-3.15.i386.rpm php-pear-4.3.9-3.15.i386.rpm

#安装piranha
rpm -ivh piranha-0.8.3-1.i386.rpm

Piranha 配置工具默認在端口 3636 上運行。要改變這個端口號碼,改變 piranha-gui 萬維網伺服器配置文件 /etc/sysconfig/ha/conf/httpd.conf 的第二部分的 Listen 3636 這一行。
ref: http://218.9.77.66:89/gate/big5/www.chinahrb.com/book/redhatas3_cluster/s1-lvs-piranha-service.html

配置转发
#查看当前设置
/sbin/sysctl net.ipv4.ip_forward
如果以上命令返回了 1,那麼 IP 轉發就被啟用了。如果它返回了 0,那麼你需要使用以下命令來手工啟用它
/sbin/sysctl -w net.ipv4.ip_forward=1

ref:http://218.9.77.66:89/gate/big5/www.chinahrb.com/book/redhatas3_cluster/s1-lvs-forwarding.html

配置LVS(DR)


ARP冲突解决
vi /etc/sysctl.conf

net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
仅修改
vi /etc/sysctl.conf不能完全解决arp冲突的问题,使用arping可以看到返回多个地址
用arptables 可以成功解决此问题

Disable ARP for VIP

Basically, we have the following commands to disable ARP for VIP at real servers.

arptables -F
arptables -A IN -d $VIP -j DROP
arptables -A OUT -s $VIP -j mangle --mangle-ip-s $RIP

ref:http://kb.linuxvirtualserver.org/wiki/Using_arptables_to_disable_ARP

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值