Get the App
SLTechnology News&Howtos  ›  Servers  › 

Centos6 configures local yum and installs keepalived through yum

Shulou Source: shulou.com Published: 2022-06-03 07:32:42 09月21日 Update

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

}

}

Tags: File configuration directory image host mode system Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft Shulou Information macOS MySQL