Linux counter

Cisco User Group

Accessi

TodayToday432
YeserdayYeserday565
This WeekThis Week4082
This MonthThis Month13730
All DaysAll Days520400
38.107.179.216
Guests 7
Registered Users 1
Registered Today 0

Mappa visitatori

Debian Lenny Heartbeat e Apache PDF Stampa E-mail
(0 - user rating)
Scritto da Alessandro Pensato   
Sabato 13 Agosto 2011 08:06
NODO 1

cat /etc/hostname
debian1


nano /etc/hosts
	127.0.0.1       localhost
	192.168.0.200   debian1.porkyhttp.no-ip.info    debian1
	192.168.0.201   debian2.porkyhttp.no-ip.info    debian2
	192.168.52.200  debian1.porkyhttp.no-ip.info    debian1
	192.168.52.201  debian2.porkyhttp.no-ip.info    debian2



nano /etc/network/interfaces
	auto lo
	auto eth0
	auto eth1
	iface lo inet loopback

	# The primary network interface
	iface eth0 inet static
		address 192.168.0.200
		netmask 255.255.255.0
		network 192.168.0.0
		broadcast 192.168.0.255
		gateway 192.168.0.1
		# dns-* options are implemented by the resolvconf package, if installed
		dns-nameservers 208.67.220.220 208.67.222.222
		dns-search porkyhttp.no-ip.info

	iface eth1 inet static
		address 192.168.52.200
		netmask 255.255.255.0
		network 192.168.52.0
		broadcast 192.168.52.255




apt-get install -y heartbeat

cd /etc/ha.d/
cp /usr/share/doc/heartbeat/authkeys .
cp /usr/share/doc/heartbeat/ha.cf.gz .
cp /usr/share/doc/heartbeat/haresources.gz .
gzip -d ha.cf.gz
gzip -d haresources.gz
chmod 600 authkeys


nano authkeys
	auth 2
	2 sha1 12345


nano ha.cf
	logfile /var/log/ha-log
	logfacility local0
	auto_failback on
	# Timeout intervals
	keepalive 2
	# keepalive could be set to 1 second here
	deadtime 10
	initdead 120
	# serial communications
	serial  /dev/ttyS0
	baud    19200
	# Ethernet communications
	udpport 694
	bcast   eth1
	# and finally, our node ids
	# node  nodename (must match uname -n)
	node    debian1
	node    debian2



nano /etc/ha.d/haresources
	debian1 192.168.0.202 apache2


apt-get install -y apache2


nano /etc/apache2/ports.conf
	Listen 192.168.0.202:80


echo "debian1 apache test server" > /var/www/index.html

update-rc.d -f apache2 remove
/etc/init.d/heartbeat start