CentOS 7.0 Installation keepalived

Source: Internet
Author: User

1. Installation directory Package

Yum install-y net-tools Psmisc

2, Installation keepalived

Yum install-y Ipvsadm keepalived

3. master configuration file

! configuration file for keepalivedglobal_defs {   notification_email  {     [email protected]     [email protected ]     [email protected]   }   notification_email_ From [email protected]   smtp_server 192.168.200.1   smtp_connect _timeout 30   router_id lvs_devel}vrrp_script chk_nginx {    script  "Killall -0 nginx"    interval 1   weight -15} vrrp_instance vi_1 {    state master    interface  eno16777736    virtual_router_id 51    priority 100     advert_int 1    authentication {         auth_type pass        auth_pass 1111     }    virtual_ipaddress {        172.16.1.10     }    track_script {         chk_nginx        }}

4, Backup configuration file

! configuration file for keepalivedglobal_defs {   notification_email  {     [email protected]     [email protected ]     [email protected]   }   notification_email_ From [email protected]   smtp_server 192.168.200.1   smtp_connect _timeout 30   router_id lvs_devel}vrrp_script chk_nginx {    script  "Killall -0 nginx"    interval 1   weight -15} vrrp_instance vi_1 {    state backup    interface  eno16777736    virtual_router_id 51    priority 99     advert_int 1    authentication {         auth_type pass        auth_pass 1111    }     virtual_ipaddress {        172.16.1.10     }    track_script {         chk_nginx        }}

5. Set open start and start keepalived

Systemctl Enable Keepalivedsystemctl start keepalived

Reference post: http://soulful.blog.51cto.com/468033/1676442

CentOS 7.0 Installation 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.