Before we had both LVS and heartbeat tested separately, it was time to merge
1.lvs+heartbeat:
Show us the console first:
Let the two software work together and let the platform have a mechanism to alarm and rescue, we need to install Ldirectord software.
ldirectord-3.9.2-1.2.x86_64.rpm
Install Ldirectord on server101 and server105 (all with Yum installed due to package and System package dependencies):
These are the relevant file locations for Ldirectord, copy the configuration file to the Heartbeat profile folder:
On both sides of the node are installed Perl-io-socket-inet6-2.56-4.el6.noarch:. Otherwise, the Ldirectord will not open because of a missing script:
To edit the Ldirectord configuration file (Vim directord.cf):
We specify two real-service nodes 192.168.2.106 and 192.168.2.107, their order of access is in the form of a round call, when two nodes are hung up. 192.168.2.101 this node to provide its own services.
Copy this configuration file to another control node 192.168.2.105 's configuration file:
Edit the Haresources file and join the Ldirectord service to Heartbeat:
Same bar This file is also copied to 192.168.2.105:/etc/ha.d/:
This time we directly start the heartbeat service, he will call the Ldirectord service on his own initiative, and the contents of our Ldirectord configuration file is complete with the same scheduling function as LVS, so that the platform is basically completed:
This is the IP information:
Then we visit the following 192.168.2.110 's website:
View the LVS information again. Each node has been interviewed 4 times:
Summary:
In this way, Heartbeat, LVS, and Ldirectord are combined to complete a highly available cluster scenario, where only the httpd service is demonstrated, assuming that there are other services in the production environment. You can also join yourself. Next post We will also introduce the second cluster scenario keepalived.
Linux Advanced Tips: Heartbeat+lvs (iii)