Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1124473
  • 博文数量: 188
  • 博客积分: 2267
  • 博客等级: 大尉
  • 技术积分: 1907
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-01 11:17
文章分类

全部博文(188)

文章存档

2016年(16)

2015年(16)

2014年(12)

2013年(32)

2012年(45)

2011年(67)

分类: LINUX

2011-10-20 13:57:12

系统环境:RHEL6.0 iptables & selinux disabled
软件环境:
heartbeat-3.0.4-1.el6.x86_64.rpm
heartbeat-libs-3.0.4-1.el6.x86_64.rpm
ldirectord-3.9.2-1.2.x86_64.rpm
ipvsadm-1.25-9.el6.x86_64

# egrep -v "#|^$" /etc/ha.d/ha.cf 
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 10 
warntime 5
initdead 40
udpport 694
auto_failback on
watchdog /dev/watchdog
node server26.example.com
node host26.example.com
ping 192.168.0.254
respawn hacluster /usr/lib64/heartbeat/ipfail
# egrep -v "#|^$" /etc/ha.d/haresources 
server26.example.com IPaddr::192.168.0.222/24/eth0 httpd
# egrep -v "#|^$" /etc/ha.d/authkeys 
auth 3 
3 md5 Hello!


节点:
/etc/sysctl.conf
net.ipv4.conf.lo.arp_announce = 1
net.ipv4.conf.lo.arp_ignore = 2
net.ipv4.conf.all.arp_announce = 1
net.ipv4.conf.all.arp_ignore = 2
sysctl -p

ifconfig eth0:0 192.168.0.222 netmask 255.255.255.255
route add -host 192.168.0.222 eth0:0
echo `hostname` > /var/www/html/index.html
/etc/init.d/httpd start
管理端:
/etc/init.d/ipvsadm restart
ipvsadm -A -t 192.168.0.222:80 -s rr
ipvsadm -a -t 192.168.0.222:80 -r 192.168.0.226:80 -g
ipvsadm -a -t 192.168.0.222:80 -r 192.168.0.126:80 -g
/etc/init.d/ipvsadm save
ifconfig eth0:0 192.168.0.222 netmask 255.255.255.255 
ipvsadm -L   //查看状态

阅读(1910) | 评论(0) | 转发(0) |
0

上一篇:Scsi 服务器搭建

下一篇:/proc/sysrq-trigger

给主人留下些什么吧!~~