ユーザ用ツール

サイト用ツール


01_linux:01_net:09_heartbeat
no way to compare when less than two revisions

差分

このページの2つのバージョン間の差分を表示します。


01_linux:01_net:09_heartbeat [2013/02/19 07:51] (現在) – 作成 matsui
行 1: 行 1:
 +====== 09 Heartbeat ======
  
 +===== インストール =====
 +<code>
 +# yum install heartbeat
 +</code>
 +
 +===== ノード1系(test1) =====
 +
 +==== /etc/ha.d/ha.cf ====
 +
 +<color blue>※2系側のIPアドレスと、利用するインタフェース(bond0)を指定</color>
 +
 +<code console>
 +logfile /var/log/ha-log
 +logfacility local0
 +keepalive 2
 +deadtime 30
 +initdead 120
 +udpport 694
 +ucast eth1 192.168.10.2
 +auto_failback off
 +node test1
 +node test2
 +</code>
 +
 +
 +==== /etc/ha.d/haresources ====
 +
 +<color blue>※host名と、VIPを指定</color>
 +
 +<code>
 +test1 IPaddr::192.168.10.10/24/eth1
 +</code>
 +
 +==== /etc/ha.d/authkeys ====
 +<code console>
 +# vi /etc/ha.d/authkeys 
 +auth 2
 +2 sha1 cluster-1
 +
 +# chmod 600 /etc/ha.d/authkeys
 +</code>
 +
 +
 +==== /etc/hosts ====
 +以下追加
 +<code>
 +192.168.10.1       test1
 +192.168.10.2       test2
 +</code>
 +
 +
 +===== ノード2系(test2) =====
 +
 +==== /etc/ha.d/ha.cf ====
 +
 +<color blue>※1系側のIPアドレスと、利用するインタフェース(eth1)を指定</color>
 +
 +<code console>
 +logfile /var/log/ha-log
 +logfacility local0
 +keepalive 2
 +deadtime 30
 +initdead 120
 +udpport 694
 +ucast eth1 192.168.10.1
 +auto_failback off
 +node test1
 +node test2
 +</code>
 +
 +
 +==== /etc/ha.d/haresources ====
 +
 +<color blue>※host名と、VIPを指定</color>
 +
 +<code>
 +test2 IPaddr::192.168.10.10/24/eth1
 +</code>
 +
 +==== /etc/ha.d/authkeys ====
 +<code console>
 +# vi /etc/ha.d/authkeys 
 +auth 2
 +2 sha1 cluster-1
 +
 +# chmod 600 /etc/ha.d/authkeys
 +</code>
 +
 +
 +==== /etc/hosts ====
 +以下追加
 +<code>
 +192.168.10.1       test1
 +192.168.10.2       test2
 +</code>
01_linux/01_net/09_heartbeat.txt · 最終更新: 2013/02/19 07:51 by matsui