HEARTBEAT (HA): clustering at www.linux-ha.org
install gnome
preperations: make /etc/hosts look like this:
127.0.0.1 localhost
192.168.1.1 router
192.168.1.2 node1 (node1,2 r the hostname--> uname -n)
192.168.1.3 node2
-on node1 make the net like this: eth0 --> 192.168.1.2
eth0:0 --> 192.168.1.4
lo --> 127.0.0.1
-on node2 : eth0 --> 192.168.1.2
lo --> 127.0.0.1
(u can also change the ips for what better for u)
download libnet from www.packetfactory.net/libnet, install it.
install heartbeat.tar.gz (./configure,make,make install)
copy from /usr/local/share/doc/heartbeat-1.0.3 these 3 files:
ha.cf,haresources,authkeys to /usr/local/etc/ha.d
-chmod 600 /usr/local/etc/ha.d/authkeys
-if u r using smb put at smb.conf: netbios name = heart
-at ha.cf use (comment out):
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 2 --> haw long between heartbeats (better b 5)
deadtime 10 --> here u tell the other server when 2 start
udpport 694
bcast eth0
node node1 <-- server host name (uname -n !)
node node2 <--
-at authkeys do:
auth 2
2 crc
-at haresources: (watch the hostname ! must be tha
MAIN computer at both!!!)
node1 IPaddr::192.168.1.2 httpd smb sendmail
-than start service heartbeat
info:
-on some ethernet cards the network wont start
with the 2 equal ips(sis900 will start)
-when 1 of the servers is down or with a disconnected
net cable the other is taking his place after a few minutes.
-services like smb must be synchronized at night!
-without gnome installed there r some missing packets when
installing. u need to install gnome development packages!
errors:
-when computer starts the ethernet card wont come up if
the other is there! so u need to take the wire out
than start computer
-check good that haresorces is configured with the main
server! so that only 1 is main (and not changing
during working houres!!!)
-for old smb server make deadtime 50 just in case smb
is slow !
|