centos6配置本地yum,通过yum安装keepalived

上传系统镜像到/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

创新互联公司主营丰都网站建设的网络公司,主营网站建设方案,成都app软件开发,丰都h5小程序设计搭建,丰都网站营销推广欢迎丰都等地区企业咨询

配置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
}
}


文章名称:centos6配置本地yum,通过yum安装keepalived
分享链接:http://bzwzjz.com/article/ghsiih.html

其他资讯

Copyright © 2007-2020 广东宝晨空调科技有限公司 All Rights Reserved 粤ICP备2022107769号
友情链接: 成都商城网站建设 成都网站建设公司 网站建设方案 自适应网站建设 网站制作 H5网站制作 网站制作公司 企业网站设计 网站制作 成都网站设计 外贸网站建设 成都网站设计 品牌网站建设 成都网站制作 手机网站建设 成都网站设计 成都网站建设公司 重庆网站建设 营销网站建设 成都网站建设 成都网站制作 成都网站建设