您好,登錄后才能下訂單哦!
上傳系統(tǒng)鏡像到/iso
創(chuàng)建目錄
mkdir /media/cdrom
掛載鏡像文件到剛創(chuàng)建的目錄
mount -o loop /iso/CentOS-6.6-x86_64-bin-DVD1.iso /media/cdrom
yum通過(guò)本地源安裝keepalived
yum --disablerepo=* --enablerepo=c6-media install -y keepalived
啟動(dòng) keepalived
/etc/init.d/keepalived start
將keepalived加入到自啟列表并設(shè)置為啟動(dòng)
chkconfig --add keepalived
chkconfig keepalived on
配置keepalived文件
vi /etc/keepalived/keepalived.conf
(i進(jìn)入編輯模式,esc退出,:回到末行,wq保存退出)
主機(jī)配置文件:
! Configuration File for keepalived
global_defs {
notification_email {acassen@firewall.loc
br/>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
}
備機(jī)配置文件:
! Configuration File for keepalived
global_defs {
notification_email {acassen@firewall.loc
br/>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
}
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。