Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos6 configures local yum and installs keepalived through yum

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Upload system image to / iso

Create a directory

Mkdir / media/cdrom

Mount the image file to the directory you just created

Mount-o loop / iso/CentOS-6.6-x86_64-bin-DVD1.iso / media/cdrom

Yum installs keepalived from a local source

Yum-disablerepo=*-enablerepo=c6-media install-y keepalived

Start keepalived

/ etc/init.d/keepalived start

Add keepalived to the self-boot list and set it to start

Chkconfig-add keepalived

Chkconfig keepalived on

Configure the keepalived file

Vi / etc/keepalived/keepalived.conf

(I enter edit mode, esc exit,: go back to the last line, wq save exit)

Host profile:

! Configuration File for keepalived

Global_defs {

Notification_email {acassen@firewall.locbr/ > acassen@firewall.loc

Br/ > sysadmin@firewall.loc

Notification_email_from Alexandre.Cassen@firewall.loc

Smtp_server 127.0.0.1

Smtp_connect_timeout 30

Router_id LVS_DEVEL

}

Vrrp_instance VI_1 {

State MASTER

Interface em1

Virtual_router_id 51

Priority 100

Advert_int 1

}

Authentication {

Auth_type PASS

Auth_pass 1111

}

Virtual_ipaddress {

172.17.17.130/24

}

Standby configuration file:

! Configuration File for keepalived

Global_defs {

Notification_email {acassen@firewall.locbr/ > acassen@firewall.loc

Br/ > sysadmin@firewall.loc

Notification_email_from Alexandre.Cassen@firewall.loc

Smtp_server 127.0.0.1

Smtp_connect_timeout 30

Router_id LVS_DEVEL

}

Vrrp_instance VI_1 {

State BACKUP

Interface em1

Virtual_router_id 51

Priority 95

Advert_int 1

}

Authentication {

Auth_type PASS

Auth_pass 1111

}

Virtual_ipaddress {

172.17.17.130/24

}

}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report