Linux Advanced Tips: Heartbeat+lvs (iii)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.