分类: LINUX
2007-08-01 14:55:18
LVS_REDHAT_AS3的RPM安装方式
下载下列软件:
[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@lvs
#
# /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
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@lvs
#
# /etc/ha.d/haresources
#
lvs1.u-happy.com IPaddr::221.122.46.210/24/221.122.46.255 ipvsadm ldirectord::
[root@lvs
#
# /etc/ha.d/authkeys
#
auth 1
1 crc
[root@lvs
[root@lvs
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@lvs
[root@lvs
[root@lvs
Stopping ldirectord Config file ldirectord.cf not found
[FAILED]
[root@lvs
Starting High-Availability services:
[ OK ]