在 linux 下做双机热备步骤
Red hat 9 linux 的双机热备安装比较简单,需要的安装文件有以下几个:
heartbeat-1.0.4-2.rh.9.um.1.i386.rpm
heartbeat-pils-1.0.4-2.rh.9.um.1.i386.rpm
heartbeat-stonith-1.0.4-2.rh.9.um.1.i386.rpm
net-snmp-5.0.6-17.i386.rpm
按顺序依次安装:
1、heartbeat-pils-1.0.4-2.rh.9.um.1.i386.rpm
2、net-snmp-5.0.6-17.i386.rpm
3、heartbeat-stonith-1.0.4-2.rh.9.um.1.i386.rpm
4、heartbeat-1.0.4-2.rh.9.um.1.i386.rpm
#rpm -ivh heartbeat-pils-1.0.4-2.rh.9.um.1.i386.rpm
#rpm -ivh net-snmp-5.0.6-17.i386.rpm
#rpm -ivh heartbeat-stonith-1.0.4-2.rh.9.um.1.i386.rpm
#rpm -ivh heartbeat-1.0.4-2.rh.9.um.1.i386.rpm
安装完成之后,开始配置主服务器。配置文件位于 /etc/ha.d 下,用 rpm 安装之后不会产生配
置文件,需要从 /usr/share/doc/heartbeat-1.0.4 下,把 ha.cf,,,,authkeys,,,,,,,,haresources,,,,三个文
件 cp 到/etc/ha.d 下面。
文件在 ha.cf 是主要 heartbeat 的配置文件, authkeys 是 heartbeat 的安全配置文件, haresource
文件是 heartbeat的资源文件
其文件说明如下:
ha.cf
###############################################################################
##############
#
# There are lots of options in this file. All you have to have is a set
# of nodes listed {"node ...}
# and one of {serial, bcast, mcast, or ucast}
#
# ATTENTION: As the configuration file is read line by line,
# THE ORDER OF DIRECTIVE MA TTERS!
#
# In particular, make sure that the timings and udpport
# et al are set before the heartbeat media are defined!
# All will be fine if you keep them ordered as in this