Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
My aim is to setup a high-availability and failover setup for a webserver. I am a total newbie on this so I had quite a bit to read on this. I also followed a few tutorials/howtos on the web but without 100% success.
Here is my setup:
I have two machines with internal IPs, let's say: node01 192.168.10.82 and node02: 192.168.10.83
node01 also has a virtual IP 192.168.10.81, which is supposed to move between node01 and node02 in case of failover.
I have one external IP let's say: 96.xxx.xxx.xxx NAT'ed to 192.168.10.81
Both nodes have
Centos 6.3 minimal install
Heartbeat does not work for Services directly
you would need a service monitoring script for that
heartbeat will only kick in on the slave if the other heartbeat itself shuts-down (network card issue, machine dies, etc) not if a service dies.
it doesn't care about whether Apache, bind, MySQL or any other service is running.
people often confuse what the haresources file actually does
lets break it down:
node01 192.168.10.81 httpd
the first word is the master node
then you have the virtual ip which by the way the "proper" syntax is IPaddr::ip/subnetmask/Ethernet-device (ex IPaddr::192.168.10.81/24/eth0)
next thing is a space separated list of services
a lot of times the list of services gets confused for what heartbeat monitors where its just what heartbeat starts (if master) and stops (if slave)
if you put for example
server1 IPaddr::192.168.0.174/24/eth0 httpd mysql nfs-kernel-server
then heartbeat when master will execute:
service httpd start
service mysql start
service nfs-kernel-server start
and when as slave
service httpd stop
service mysql stop
service nfs-kernel-server stop
as you see its not monitoring them its just starting and stopping them
some services require the ip set *before* starting (without sysctl hacks) and that's why heartbeat works like this