How to configure the dual-computer hot standby of LVS-DR+Keepalived website server
It is believed that many inexperienced people do not know what to do about how to configure the dual-computer hot standby of LVS-DR+Keepalived website server. therefore, this paper summarizes the causes and solutions of the problem. I hope you can solve this problem through this article.
Keepalived is a software similar to layer3, 4-7 switching mechanism, which is what we usually call layer 3, layer 4 and layer 7 switching. Keepalived is done automatically without human intervention.
Scheduling server:
It needs to be done on the basis of LVS.
Refer to the previous two sections:
LVS-DR: https://blog.51cto.com/13572519/2084197, one of the load balancing clusters
Load balancing Cluster-LVS-NAT: https://blog.51cto.com/13572519/2084181
A network card:
Vmnet1:192.168.80.100
Both the master and slave scheduler do the following three steps: load and install the ipvsadm package
Download address: http://www.keepalived.org/download.html
[root@lss ~] # modprobe ip_vs
[root@lss] # rpm-ivh / mnt/Packages/ipvsadm-1.27-7.el7.x86_64.rpm
-keepalived installation configuration (both master and slave)
[root@lss ~] # yum-y install popt-devel kernel-devel openssl-devel
WinSCP uploads keepalived to master-slave server
[root@lss] # tar fx keepalived-1.4.2.tar.gz-C / opt
[root@lss opt] # cd / opt/keepalived-1.4.2/
[root@lss keepalived-1.4.2] # yum-y install\
Gcc\
Gcc-c++\
Make
[root@lss keepalived-1.4.2] #. / configure-prefix=/
[root@lss keepalived-1.4.2] # make & & make install
[root@lss keepalived] # cp-r / opt/keepalived-1.4.2/keepalived/etc/keepalived/ / etc/init.d
[root@lss keepalived] # systemctl enable keepalived
-- modify the configuration file (main scheduler)-
[root@lss keepalived] # vi / etc/keepalived/keepalived.conf
! Configuration File for keepalived
Global_defs {
Notification_email {acassen@firewall.locbr/ > sysadmin@firewall.loc