Deploying FTP Dual-Machine hot standby keepalived+ftp under Linux

Source: Internet
Author: User
Tags ftp client

FTP implementation of dual-machine hot standby in Linux environment

In order to realize data storage in production environment, Ftp+mfs realizes data storage using

To prevent the single point of FTP failure in chickens, the use of ftp+keepalived to achieve high availability

Two FTP servers have been installed and have normal access, with IP addresses of 192.168.10.192 and 192.168.10.193 respectively

VIP set to 192.168.10.190

First Step Installation

Hot Spare Service software:

Lvs:

ipvsadm-1.26-3.1.i586.rpm

Keepalived:

Keepalived-1.2.13.tar.gz

LVS is installed with Yum

Yum Install Ipvsadm

Keepalived Using Source Installation

#tar-ZXVF keepalived-1.2.13.tar.gz

#cd keepalived-1.2.13

#./configure--prefix=/usr/local/keepalived

#make && make Install

cp/usr/local/keepalived/sbin/keepalived/usr/sbin/

cp/usr/local/keepalived/etc/sysconfig/keepalived/etc/sysconfig/

cp/usr/local/keepalived/etc/rc.d/init.d/keepalived/etc/init.d/

Mkdir/etc/keepalived

cd/etc/keepalived/


Configuring the Master 192.168.10.192

Edit/etc/keepalived/keepalived.conf

*************************************

Global_defs {

router_id Lvs_devel

}

Vrrp_sync_group VGM {

Group {

Vi_cache

}

}


Vrrp_instance Vi_cache {

State MASTER

Interface eth0

VIRTUAL_ROUTER_ID 51

Priority 100

Advert_int 1

Authentication {

Auth_type PASS

Auth_pass 1111

}

virtual_ipaddress {

192.168.10.190

}

}

Virtual_server 192.168.10.190 80 {

Delay_loop 6

Lb_algo WLC

Lb_kind DR

# Nat_mask 255.255.0.0

Persistence_timeout 50

Protocol TCP


Real_server 192.168.10.192 80 {

Weight 1

Misc_check {

Connect_timeout 10

Nb_get_retry 3

Delay_before_retry 3

Connect_port 80

}

}

Real_server 192.168.10.193 80 {

Weight 1

Misc_check {

Connect_timeout 10

Nb_get_retry 3

Delay_before_retry 3

Connect_port 80

}

}

}

*******************************************

Note: At this point the port for keepalived use port 80, remember not to change to 21, the first time I get rid of, find a good long time problem.

*******************************************

Configuring Backup Server Backups


Vrrp_instance Vi_cache {

State BACKUP

Interface eth0

VIRTUAL_ROUTER_ID 51

Priority 99

Advert_int 1

Authentication {

Auth_type PASS

Auth_pass 1111

}

virtual_ipaddress {

192.168.10.190

}

}

*******************************************

1, start the LVS

#ipvsadm

To see if it started successfully,

#lsmod |grep Ip_v

2, start keepalive

/etc/rc.d/init.d/keepalived start

To see if it started successfully,

#ps-ef|grep keepalived

3, to view the hot standby condition,

#ipvsadm

#查看热备运行日志

#tail-F/var/log/message

4. Check that the virtual address is loaded on the NIC properly.

#ip A


#service vsftpd Start

Then use a third-party computer to access the virtual address FTP 192.168.10.190,

You can see that when the primary and standby service is switched on, the FTP client will log on to different servers (71 or 72) separately, proving that the FTP service is properly set up for dual-machine hot standby.

Deploying FTP Dual-Machine hot standby keepalived+ftp under Linux

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.