在linux下做双机热备步骤

上传人:飞*** 文档编号:42624824 上传时间:2018-06-02 格式:DOC 页数:10 大小:66.50KB
返回 下载 相关 举报
在linux下做双机热备步骤_第1页
第1页 / 共10页
在linux下做双机热备步骤_第2页
第2页 / 共10页
在linux下做双机热备步骤_第3页
第3页 / 共10页
在linux下做双机热备步骤_第4页
第4页 / 共10页
在linux下做双机热备步骤_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《在linux下做双机热备步骤》由会员分享,可在线阅读,更多相关《在linux下做双机热备步骤(10页珍藏版)》请在金锄头文库上搜索。

1、在 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

2、-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 下,用

3、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

4、 listed “node . # and one of serial, bcast, mcast, or ucast # # ATTENTION: As the configuration file is read line by line, # THE ORDER OF DIRECTIVE MATTERS! # # 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 kee

5、p 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 logfac

6、ility 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 todebugfi

7、le /var/log/ha-debug 【heartbeat 的 debug 信息记录文件】# # # File to write other messages to #logfile /var/log/ha-log 【日志文件】 # # # Facility to use for syslog()/logger #logfacility local0 【记录日志在 syslog 中,可选项】 # # # A note on specifying “how long“ times below. # # The default time unit is seconds # 10 means t

8、en seconds # # You can also specify them in milliseconds # 1500ms means 1.5 seconds # # # keepalive: how long between heartbeats? #keepalive 3 【每 3 秒发送一次 keeplive 消息】 # # deadtime: how long-to-declare-host-dead? #deadtime 15 【如果 15 秒没有收到 keeplive 消息将会认为节点已经失效】# # warntime: how long before issuing “l

9、ate heartbeat“ warning? # See the FAQ for how to use warntime to tune deadtime. #warntime 10 【在日志中记录最后心跳 last heartbeat-best 前的警告时间】# # # Very first dead time (initdead) # # On some machines/OSes, etc. the network takes a while to come up # and start working right after youve been rebooted. As a res

10、ult # we have a separate dead time for when things first come up. # It should be at least twice the normal dead time. #initdead 60 【如果节点的机器重启后,可能需要一些时间启动网络,这个 时间与 deadtime 不一样,要单独对待】 # # # nice_failback: determines whether a resource will # automatically fail back to its “primary“ node, or remain #

11、on whatever node is serving it until that node fails. # # The default is “off“, which means that it WILL fail # back to the node which is declared as primary in haresources # # “on“ means that resources only move to new nodes when # the nodes they are served on die. This is deemed as a # “nice“ beha

12、vior (unless you want to do active-active). #nice_failback on 【如果主节点失效之后,重新恢复后,不会再成为主节点, 只有当当前主节点失效,此节点才可恢复 为主节点】# # hopfudge maximum hop count minus number of nodes in config #hopfudge 1 # # # Baud rate for serial ports. # (must precede “serial“ directives) # #baud 19200# # serial serialportname .

13、#serial /dev/ttyS0 # Linux #serial /dev/cuaa0 # FreeBSD #serial /dev/cua/a # Solaris # # What UDP port to use for communication? # used by bcast and ucast # #udpport 694 # # What interfaces to broadcast heartbeats over? # #bcast eth1 # Linux #bcast eth1 eth2 # Linux #bcast le0 # Solaris #bcast le1 l

14、e2 # Solaris # # Set up a multicast heartbeat medium # mcast dev mcast group port ttl loop # # dev device to send/rcv heartbeats on # mcast group multicast group to join (class D multicast address # 224.0.0.0 - 239.255.255.255) # port udp port to sendto/rcvfrom (no reason to differ # from the port used for broadcast heartbeats) # ttl the ttl value for outbound heartbeats. This affects # how far the multicast packet will propagate. (1-255) # loop toggles loopback for outbound multicast heartbeats. # if enabled, an outbound packet will be looped back and # received by the

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号