Keepalived01: Dual-Nic server hot standby

Source: Internet
Author: User
Keepalived01: Dual-Nic server hot standby 01keepalived dual-Nic server dual-Nic hot standby 0203 environment: 04 master: eth0 (192.168.0.100/24) eth1 (10.0.0.100/24) 05 backup: eth0 (192.168.0.200/24) eth1 (10.0.0.200/24) keepalived01: Dual-Nic server hot backup 01keepalived dual-Nic server hot backup 02 03 environment: 04 master: eth0 (192.168.0.100/24) eth1 (10.0.0.100/24) 05 backup: eth0 (192.168.0.200/24) eth1 (10.0.0.200/24) 06 07 software installation: 08 installation dependency: 09 yum install ipvsadm kernel-devel openssl-devel popt-devel \ 10 libnl -Devel gcc make-y11 unzip compilation: 12 tar zxf keepalived-1.2.7.tar.gz13 cd keepalived-1.2.714. /configure -- prefix =/usr/local/keepalived15 make & make install16 do link: 17 ln-s/usr/local/keepalived/etc/rc. d/init. d/keepalived/etc/init. d/18 ln-s/usr/local/keepalived/etc/sysconfig/19 ln-s/usr/local/keepalived/etc /20 ln-s/usr/local/keepalived/sbin/keepalived/us R/sbin/21 backup configuration file: 22 cp/etc/keepalived. conf/etc/keepalived. conf. bak23 add User: 24 useradd keepalived25 26 modify configuration: 27 vi/etc/keepalived. conf28 ####################################### ######################## 29! Configuration File for each 31global_defs {32 icationication_email {33 oscersong007@gmail.com34} 35 keep keepalived @ localhost36 smtp_server route Route route 3038 router_id LVS_DEVEL39} restart VGM {41 group {42 VI_143} 44} 45vrrp_instance VI_1 {MASTER # BACKUP47 interface eth048 virtual_router_id 5149 priority 100 #5050 advert_int 151 authen Tication {52 auth_type PASS53 auth_pass westos54} 55 track_interface {56 eth057 eth158} 59 virtual_ipaddress {60 192.168.0.150/24 dev versions 10.0.0.150/24 dev eth162} 63} 64 65 ###### ######################################## ################ 66. start the service test: 68 tail-f/var/log/message69/etc/init. d/keepalived start (master, backup) 70 master test page "MASTER", backup test page "BACKUP" 71 72 master, backup keepalived all start at B Ackup test: 73 [root @ backup ~] # Curl http://192.168.0.15074MASKTER75 [Root @ backup ~] # Curl http://10.0.0.15076MASKTER77 Run the eht1 command of the master node and test it on the backup end: 78 [root @ backup ~] # Curl http://192.168.0.15079BACKUP80 [Root @ backup ~] # Curl http://10.0.0.15081BACKUP
Related Article

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.