Linux advanced skills: cluster's keepalived

  
Keepalived is a high-availability WEB service based on VRRP protocol, which can be used to avoid single point of failure. Install keepalived using multiple nodes. Other nodes are used to provide real services, and as such, they present a virtual IP. When the primary server goes down, the backup server takes over the virtual IP and continues to provide services, thus ensuring high availability.
keepalived schematic as follows:

far left is the client that accesses our virtual IP. Then we have the master (master control node) and the backup (alternate control node). The far right is the real machine we provide services.
2. Building a keepalived service
We use four nodes to do this experiment, two acting as control nodes and two serving. Then use the real machine's browser to access the virtual IP.
Note:
1. All nodes should be parsed.
2.
3.yum time synchronization source is set up (in addition to the basic source, high availability, also have to add)

shown in our operating console:

keepalived installation package is:
keepalived-1.2.13.tar.gz
two control nodes are decompressed and compile, install keepalived:

before compiling keepalived we need to install some related packages :


compiled keepalived source package:

this is our compiled results:

then we install:

the above two steps We must do this on the control node, and finally we set the primary and secondary nodes in the configuration file.
Copyright © Windows knowledge All Rights Reserved