[RHEL 4U4] 最小安装后安装配置LVS (RPM)
来源:互联网 发布:加工中心键槽怎么编程 编辑:程序博客网 时间:2024/05/22 03:36
前提: 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,那麼你需要使用以下命令來手工啟用它
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
#安装 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 -Farptables -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
- [RHEL 4U4] 最小安装后安装配置LVS (RPM)
- [RHEL 4U4] 最小安装后安装Apache(RPM)
- [RHEL 4U4] [最小] gcc安装
- [RHEL 4U4] [最小] 安装Lustre 1.6
- RHEL安装文件之rpm
- RHEL安装后
- CentOS6.4 LVS rpm包安装及源码安装
- RHEL 安装配置
- linux安装nginx(rhel-rpm)
- CentOS LVS安装配置
- lvs 安装配置小结
- lVS+lamp安装配置
- lvs安装配置
- lvs安装与配置
- lvs安装与配置
- LVS安装与配置
- lvs安装配置
- LVS-NAT配置安装
- GNU宣言
- Linux操作:vi命令详解
- 近期烦心的人
- 从List list=new ArrayList()看面向接口编程的重要性
- Sun终于使Java成为开源软件 采用GPL许可
- [RHEL 4U4] 最小安装后安装配置LVS (RPM)
- APB .NET版本功能和技术特点
- 诗的意境
- 经典书籍
- 从xml文件中读取一个接点或者多个
- J2SE:Java解析网络数据流的三种特殊方法
- 24点小游戏
- J2SE:Java对各种文件的操作详解
- Appeon for PowerBuilder 5.0 for .NET版本介绍