- PyXML
- libidn
- curl
- libxml
- gnutls
# groupadd -g 100 haclient
# useradd -u 100 -g 100 -d /var/lib/heartbeat/cores/hacluster hacluster
デフォルトは以下
/etc/passwd
hacluster:x:498:496::/var/lib/heartbeat/cores/hacluster:/bin/bash
/etc/group
haclient:x:82:
# rpm -ivh heartbeat-pils-2.1.3-1.x86_64.rpm
# rpm -ivh heartbeat-stonith-2.1.3-1.x86_64.rpm
# rpm -ivh heartbeat-2.1.3-1.x86_64.rpm
# vi /etc/ha.d/authkeys
auth 1
1 sha1 test
# chmod 600 /etc/ha.d/authkeys
# vi /etc/ha.d/haresources
host01 IPaddr::192.168.1.3/24/eth1 drbddisk::r0 Filesystem::/dev/drbd0::/var/lib/mysql::ext3 mysql
# chmod 600 /etc/ha.d/haresources
※Actのホスト名 IPaddr::VIP/ネットマスク/インターフェース名 drbddisk::DRBDリソース名 Filesystem::デバイス名::マウントポイント::ファイルシステム 起動アプリ
- ha.cfの編集(ucastで相手のIPを指定、host01とhost02とではファイル内容は異なる)
# vi /etc/ha.d/ha.cf
crm no
logfile /var/log/ha-log
keepalive 3
deadtime 30
deadping 40
warntime 10
initdead 120
udpport 694
auto_failback off
node host01
node host02
ucast eth1 192.168.1.2
ucast eth0 192.168.2.2
watchdog /dev/watchdog
respawn root /usr/local/monitor.sh
※ucast部分は通信相手ホストのIPを記述
※respawn root /usr/local/monitor.shは監視スクリプトを作成時に記述
# /etc/init.d/heartbeat start
# chkconfig heartbeat on
# chkconfig --list heartbeat
heartbeat 0:off 1:off 2:on 3:on 4:on 5:on 6:off
最終更新:2010年07月21日 13:19