keepalived Introduction
Keepalived is a software similar to the Layer3, 4 & 5 switch, which is what we normally call the 3rd, 4th, and 5th layers of exchange. The role of keepalived is to detect the state of the Web server, if a Web server freezes, or a work failure occurs, keepalived detects and rejects the failed Web server from the system. When the Web server is working properly, Keepalived automatically joins the Web server to the server farm, all of which are done automatically, without the need for manual intervention, and the only thing that needs to be done manually is to repair the failed Web server.
keepalived Download:
: http://www.keepalived.org/download.html can select the desired version.
wget http://www.keepalived.org/software/keepalived-1.2.1.tar.gz
Experimental environment
Two Redhat Linux RHEL 5.5:
Unzip Keepalived-1.2.1.tar to/USR/SRC
cd/usr/src/keepalived-1.2.1
./configure--prefix=/usr/local/keepalived
Make
Make install
No accident, the installation process is complete, the next to manually copy something, set up the system services to start running:
Can see/usr/local/keepalived below a few files, we need to copy some files into other folders, the following is how to do:
cp/usr/local/keepalived/etc/rc.d/init.d/keepalived/etc/rc.d/init.d/
cp/usr/local/keepalived/etc/sysconfig/keepalived/etc/sysconfig/
Mkdir/etc/keepalived
cp/usr/local/keepalived/etc/keepalived/keepalived.conf/etc/keepalived/
cp/usr/local/keepalived/sbin/keepalived/usr/sbin/
To add a system service boot up:
Chkconfig--add keepalived
Chkconfig--level 345 keepalived on
Manually starting or stopping services is a service keepalived Start|stop|restart
The next step is to configure the Conf file and only configure/etc/keepalived/keepalived.conf to take effect.
This article is from the "Boyhack" blog, make sure to keep this source http://461205160.blog.51cto.com/274918/1740070
Keepalived compilation installation under RHEL5.5