Ubuntu64 apache2+lvs+keepalived

Source: Internet
Author: User

Installation of Apache2, Vim, keepalived and Ipvsadm

Open vim/etc/keepalived/keepalived.conf

Click I, enter the edit status, enter:

! Configuration File for keepalivedglobal_defs {   router_id lvsmaster}vrrp_instance vi_1 {State    MASTER    Interface ENS33 # External service nic    virtual_router_id #VRRP组名, two node settings must be the same to indicate that each node belongs to the same vrrp> group priority    100 # The priority of the primary node (between 1-254), the standby node must be lower than the primary node priority    Advert_int 1 #设置主备之间同步检查的时间间隔单位秒    authentication {#设置验证信息, two nodes must be consistent        Auth_type PASS        auth_pass abcd123    }    virtual_ipaddress {#指定虚拟IP, two node settings must be the same        192.168.144.200    } }virtual_server 192.168.144.200 {    delay_loop 6    Lb_algo rr    lb_kind DR    persistence_timeout 0    protocol TCP    real_server 192.168.144.128 {        weight 1        tcp_check {            connect_timeout            Nb_get_retry 3            delay_before_retry 3            connect_port        }}    }

Then click ESC, Exit Edit, enter: Wq hold.

Start Service keepalived Start

Edit apache2 Default Page index.html

Start LAN Access lvs:192.168.144.200

Ubuntu64 apache2+lvs+keepalived

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.