一:安装程式:
先安装以下程式:
ipvsadm-1.21-1.rh.el.1.i386.rpm
ipvsadm-debuginfo-1.21-1.rh.el.1.i386.rpm
libnet-1.1.0-1.rh.el.1.i386.rpm
libnet-debuginfo-1.1.0-1.rh.el.1.i386.rpm
perl-Authen-SASL-2.03-1.rh.el.um.1.noarch.rpm
perl-Convert-ASN1-0.16-2.rh.el.um.1.noarch.rpm
perl-Digest-HMAC-1.01-11.1.noarch.rpm
perl-Digest-SHA1-2.01-15.1.i386.rpm
perl-IO-Socket-SSL-0.92-1.rh.el.um.1.noarch.rpm
perl-ldap-0.2701-1.rh.el.um.1.noarch.rpm
perl-Mail-IMAPClient-2.2.7-1.rh.el.um.1.noarch.rpm
perl-Net-SSLeay-1.23-1.rh.el.um.1.i386.rpm
perl-Net-SSLeay-debuginfo-1.23-1.rh.el.um.1.i386.rpm
perl-Parse-RecDescent-1.80-1.rh.el.um.1.noarch.rpm
perl-XML-NamespaceSupport-1.08-1.rh.el.um.1.noarch.rpm
77,255 perl-XML-SAX-0.12-1.rh.el.um.1.noarch.rpm
然后再安装以下程式:
heartbeat-ldirectord-1.2.3-2.rh.el.3.0.i386.rpm
heartbeat-1.2.3-2.rh.el.3.0.i386.rpm
heartbeat-pils-1.2.3-2.rh.el.3.0.i386.rpm
heartbeat-stonith-1.2.3-2.rh.el.3.0.i386.rpm
二:配置文档:
/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.247.160 ha1.chess.gz ha1
192.168.247.161 ha2.chess.gz ha2
192.168.247.180 ha.chess.gz ha
/etc/ha.d/authkeys
#
# Authentication file. Must be mode 600
#
#
# Must have exactly one auth directive at the front.
# auth send authentication using this method-id
#
# Then, list the method and key that go with that method-id
#
# Available methods: crc sha1, md5. Crc doesn't need/want a key.
#
# You normally only have one authentication method-id listed in this file
#
# Put more than one to make a smooth transition when changing auth
# methods and/or keys.
#
#
# sha1 is believed to be the "best", md5 next best.
#
# crc adds no security, except from packet corruption.
# Use only on physically secure networks.
#
auth 1
1 crc
#2 sha1 HI!
#3 md5 Hello!
/etc/ha.d/ha.cf
#
# There are lots of options in this file. All you have to have is a set
# of nodes listed {"node ...} one of {serial, bcast, mcast, or ucast},
# and a value for "auto_failback".
#
# ATTENTION: As the configuration file is read line by line,
# THE ORDER OF DIRECTIVE MATTERS!
#
# In particular, make sure that the udpport, serial baud rate
# etc. are set before the heartbeat media are defined!
# debug and log file directives go into effect when they
# are encountered.
#
# All will be fine if you keep them ordered as in this example.
#
#
# Note on logging:
# If any of debugfile, logfile and logfacility are defined then they
# will be used. If debugfile and/or logfile are not defined and
# logfacility is defined then the respective logging and debug
# messages will be loged to syslog. If logfacility is not defined
# then debugfile and logfile will be used to log messges. If
# logfacility is not defined and debugfile and/or logfile are not
# defined then defaults will be used for debugfile and logfile as
# required and messages will be sent there.
#
# File to write debug messages to
debugfile /var/log/ha-debug
#
#
# File to write other messages to
#
logfile /var/log/ha-log
#
#
# Facility to use for syslog()/logger
#
logfacility local0
#
#
# A note on specifying "how long" times below...
#
# The default time unit is seconds
# 10 means ten seconds
#
# You can also specify them in milliseconds
# 1500ms means 1.5 seconds
#
#
# keepalive: how long between heartbeats?
#
keepalive 2
#
# deadtime: how long-to-declare-host-dead?
#
# If you set this too low you will get the problematic
# split-brain (or cluster partition) problem.
# See the FAQ for how to use warntime to tune deadtime.
#
deadtime 10
#
# warntime: how long before issuing "late heartbeat" warning?
# See the FAQ for how to use warntime to tune deadtime.
#
warntime 10
#
#
# Very first dead time (initdead)
#
# On some machines/OSes, etc. the network takes a while to come up
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




