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