00:0C:29:19:E7:B9 192.168.8.140 lux5.kgitbank.local 00:0C:29:4E:AB:4B 192.168.8.141 lux4.kgitbank.local
1. To change hostname on each nodes Node 1 # vi /etc/sysconfig/network 에서 HOSTNAME=lux4.kgitbank.lcoal
2. /etc/hosts 파일 수정 Node 1 # vi /etc/hosts에서 192.168.8.141 lux4.kgitbank.lcoal
3. 타임서버 동기화 Node 1 # corntab -e
4. To set auto mount by restart
5. 저장소 추가후 Heartbeat 설치 Node 1,2 동일 # yum -y install epel-release
6. 환경설정파일 복사 Node 1,2 동일 # rpm -q heartbeat -d Node 1,2 동일 # cd /usr/share/doc/heartbeat-3.0.4/ Node 1,2 동일 # cp ha.cf haresources authkeys /etc/ha.d/
Node 1,2 동일 # vi /etc/ha.d/ha.cf 파일의 끝에 설정하면 된다.
Node 1,2 동일 # touch /var/log/ha-debug.log
UDP 포트에 대한 방화벽은 해제한다. Node 1,2 동일 # service iptables restart Node 1 # vi /etc/ha.d/haresources lux4.kgitbank.local IPaddr2::192.168.8.250/24/eth0:0/192.168.8.255 httpd
Node 2 # vi /etc/ha.d/haresources lux5.kgitbank.local IPaddr2::192.168.8.250/24/eth0:0/192.168.8.255 httpd
11. authkeys 설정 authkeys : 보안수준을 설정(노트간의 인증방법 지정) Node 1,2 동일 # vi /etc/ha.d/authkeys
Node 1,2 동일 # chmod 600 /etc/ha.d/authkeys - 권한변경(필수)
12. 공용 서비스할 데몬 파일의 링크 생성 Node 1,2 동일 # ln -s /etc/rc.d/init.d/httpd /etc/ha.d/resource.d/httpd
Node 1,2 동일 # vi /etc/httpd/conf/httpd.conf Node 1,2 동일 # system-config-firewall에서 HTTP 방화벽 열기
Node 1 # chkconfig heartbeat on Node 1 먼저 실행(마스터) # service heartbeat start
Node 2 # chkconfig heartbeat on Node 2 실행(슬레이브) # service heartbeat start
상태 확인
|