heartbeat配置说明(3)

1.3.2. ha.cf
文件所在:/etc/ha.d/ha.cf
中文注释来自linuxer_jlu,蓝色部分是我在主服务器的配置。两台服务器的这个配置文件内容完全相同。
为了保证能够正常启动,需要创建两个用户,分别是haclient和hacluster。
指令如下:
useradd haclient
useradd hacluster
下面灰色背景部分是配置文件内容:蓝色字的部分是具体配置
#用于记录heartbeat的调试信息
#debugfile /var/log/ha-debug
[color=blue]#logfile用于记录heartbeat的日志信息
logfile /var/log/ha.log[/color]
#如果未定义上述的日志文件,那么日志信息将送往local0(对应的#/var/log/messages),如果
#这3个日志文件都未定义,那么heartbeat默认情况下
[color=blue]#将在/var/log下建立ha-debug和ha-log来记录相应的日志信息。
logfacility local0[/color]
[color=blue]#发送心跳报文的间隔,默认单位为秒,如果你毫秒为单位,那么需要在后面跟
#ms单位,如1500ms即代表1.5s
keepalive 2
#用于配置认为对方节点菪掉的间隔
deadtime 30
#发出最后的心跳警告报文的间隔
warntime 10
#网络启动的时间
initdead 60
#广播/单播通讯使用的udp端口
udpport 694[/color]
#串口通讯的波特率
#baud 19200
# serial serialportname ...
#使用的串口设备,在linux上即为/dev/ttyS0(1,2,3…)
#serial /dev/ttyS0 # Linux
#serial /dev/cuaa0 # FreeBSD
#serial /dev/cuad0 # FreeBSD 6.x
#serial /dev/cua/a # Solaris
#心跳所使用的网络接口
#bcast eth0 # Linux
#bcast eth1 eth2 # Linux
#bcast eth1
#bcast le0 # Solaris
#bcast le1 le2 # Solaris
[color=blue]#bcast eth1为心跳网卡,注:主备心跳网卡名称必须一样
bcast eth1[/color]
# 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 (set this value to the
# same value as "udpport" above)
# [ttl] the ttl value for outbound heartbeats. this effects
# how far the multicast packet will propagate. (0-255)
# Must be greater than zero.
# [loop] toggles loopback for outbound multicast heartbeats.
# if enabled, an outbound packet will be looped back and
# received by the interface it was sent on. (0 or 1)
# Set this value to zero.
#
#如果采用组播通讯,在这里可以设置组播通讯所使用的接口,绑定的组播ip地
#址(在224.0.0.0 - 239.255.255.255间),通讯端口,ttl(time to live)所能经过路由的
#跳数,是否允许环回(也就是本地发出的数据包时候还接收)
#mcast eth0 225.0.0.1 694 1 0
#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值