Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1379015
  • 博文数量: 112
  • 博客积分: 7112
  • 博客等级: 少将
  • 技术积分: 1299
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-31 16:27
文章分类

全部博文(112)

文章存档

2011年(19)

2010年(20)

2009年(16)

2008年(20)

2007年(37)

分类: LINUX

2007-08-01 14:55:18

LVS_REDHAT_AS3RPM安装方式

 

下载下列软件:

 

[root@lvs1 src]# rpm -ivh arptables-noarp-addr-0.99.1-1.rh.el.um.1.noarch.rpm \

> heartbeat-1.2.3.cvs.20050404-1.rh.el.um.1.i386.rpm \

> heartbeat-ldirectord-1.2.3.cvs.20050404-1.rh.el.um.1.i386.rpm \

> heartbeat-pils-1.2.3.cvs.20050404-1.rh.el.um.1.i386.rpm \

> heartbeat-stonith-1.2.3.cvs.20050404-1.rh.el.um.1.i386.rpm \

> ipvsadm-1.21-1.rh.el.1.um.1.i386.rpm \

> libnet-1.1.2.1-1.rh.el.um.1.i386.rpm \

> perl-Authen-SASL-2.08-1.rh.el.um.1.noarch.rpm \

> perl-Convert-ASN1-0.18-1.rh.el.um.1.noarch.rpm \

> perl-IO-Socket-SSL-0.96-1.rh.el.um.1.noarch.rpm \

> perl-ldap-0.3202-1.rh.el.um.1.noarch.rpm \

> perl-Mail-IMAPClient-2.2.9-1.rh.el.um.1.noarch.rpm \

> perl-Net-SSLeay-1.25-1.rh.el.um.1.i386.rpm \

> perl-Parse-RecDescent-1.94-1.rh.el.um.1.noarch.rpm \

> perl-XML-NamespaceSupport-1.08-1.rh.el.um.1.noarch.rpm \

> perl-XML-SAX-0.12-1.rh.el.um.1.noarch.rpm

 

[root@lvs1 root]# vi /etc/sysctl.conf

# Kernel sysctl configuration file for Red Hat Linux

#

# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and

# sysctl.conf(5) for more details.

 

# Controls IP packet forwarding

# =====change by zhoushq for LVS ===========

#net.ipv4.ip_forward = 0

net.ipv4.ip_forward = 1

# =====change by zhoushq for LVS ====end====

 

# Controls source route verification

net.ipv4.conf.default.rp_filter = 1

 

# Controls the System Request debugging functionality of the kernel

kernel.sysrq = 0

 

# Controls whether core dumps will append the PID to the core filename.

# Useful for debugging multi-threaded applications.

kernel.core_uses_pid = 1

 

检查上一步的效果

[root@lvs1 root]# /sbin/sysctl -p

net.ipv4.ip_forward = 1

net.ipv4.conf.default.rp_filter = 1

kernel.sysrq = 0

kernel.core_uses_pid = 1

 

[root@lvs1 root]# cd /etc/ha.d

[root@lvs1 ha.d]# vi ha.cf

#

# /etc/ha.d/ha.cf

#

debugfile /var/log/ha-debug

logfile /var/log/ha-log

logfacility     local0

keepalive 2

deadtime 30

warntime 10

initdead 120

udpport 694

ucast eth1      10.0.0.5

node    lvs1.u-happy.com

node    lvs2.u-happy.com

ping ns2.u-happy.com

auto_failback off

respawn hacluster /usr/lib/heartbeat/ipfail

 

 

 

 

 

 

 

 

[root@lvs1 ha.d]# vi haresources

#

#        /etc/ha.d/haresources

#

lvs1.u-happy.com IPaddr::221.122.46.210/24/221.122.46.255 ipvsadm ldirectord::

 

[root@lvs1 ha.d]# vi authkeys

#

# /etc/ha.d/authkeys

#

auth 1

1 crc

 

[root@lvs1 ha.d]# chmod 600 /etc/ha.d/authkeys

 

 

[root@lvs1 ha.d]# vi

checktimeout=3

checkinterval=1

fallback=127.0.0.1:80

autoreload=yes

logfile="/var/log/ldirectord.log"

#logfile="local0"

quiescent=yes

 

# A sample virual with a fallback that will override the gobal setting

virtual=221.122.46.210:80

        real=221.122.46.219:80 gate

        real=221.122.46.221:80 gate

        real=221.122.46.213:80 gate

        fallback=127.0.0.1:80 gate

        service=http

        request="/manager/lvs_test.html"

        receive="lvs test"

        #virtualhost=some.domain.com.au

        scheduler=rr

        #persistent=600

        #netmask=255.255.255.255

        protocol=tcp

 

 

 

 

[root@lvs1 ha.d]# /sbin/chkconfig --level 2345 heartbeat on

[root@lvs1 ha.d]# /sbin/chkconfig --del ldirectord

 

[root@lvs1 ha.d]# /etc/init.d/ldirectord stop

Stopping ldirectord Config file ldirectord.cf not found

                                                           [FAILED]

[root@lvs1 ha.d]# /etc/init.d/heartbeat start

Starting High-Availability services:

                                                           [  OK  ]

阅读(1936) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~