CentOS 7.0 安裝keepalived

來源:互聯網
上載者:User

CentOS 7.0 安裝keepalived

1、安裝目錄包

yuminstall-ynet-toolspsmisc

2、安裝keepalived

yuminstall-yipvsadmkeepalived

3、master設定檔

!ConfigurationFileforkeepalivedglobal_defs{notification_email{acassen@firewall.locfailover@firewall.locsysadmin@firewall.loc}notification_email_fromAlexandre.Cassen@firewall.locsmtp_server192.168.200.1smtp_connect_timeout30router_idLVS_DEVEL}vrrp_scriptchk_nginx{script"killall-0nginx"interval1weight-15}vrrp_instanceVI_1{stateMASTERinterfaceeno16777736virtual_router_id51priority100advert_int1authentication{auth_typePASSauth_pass1111}virtual_ipaddress{172.16.1.10}track_script{chk_nginx}}

4、backup設定檔

!ConfigurationFileforkeepalivedglobal_defs{notification_email{acassen@firewall.locfailover@firewall.locsysadmin@firewall.loc}notification_email_fromAlexandre.Cassen@firewall.locsmtp_server192.168.200.1smtp_connect_timeout30router_idLVS_DEVEL}vrrp_scriptchk_nginx{script"killall-0nginx"interval1weight-15}vrrp_instanceVI_1{stateBACKUPinterfaceeno16777736virtual_router_id51priority99advert_int1authentication{auth_typePASSauth_pass1111}virtual_ipaddress{172.16.1.10}track_script{chk_nginx}}

5、設定開啟啟動和啟動keepalived

systemctlenablekeepalivedsystemctlstartkeepalived

參考博文:http://soulful.blog.51cto.com/468033/1676442

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.