yum -y install dnsmasq* wget http://www.keepalived.org/software/keepalived-1.2.9.tar.gz tar zxvf keepalived-1.2.9.tar.gz cd keepalived-1.2.9 ./configure --prefix=/usr/local/keepalived make && make install mkdir /etc/keepalived cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/ ln -s /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/ ln -s /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/ ln -s /usr/local/keepalived/sbin/keepalived /usr/sbin/ chkconfig --add keepalived chkconfig --level 35 keepalived on
! Configuration File for keepalived
global_defs {
notification_email {
xxx@xxx.com
}
notification_email_from xxx@xxx.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance dnscache {
state MASTER // 另一台配置BACKUP
interface eth1 // 在哪个接口上进行服务器状态检测
virtual_router_id 51
priority 180 // BACKUP机器上配置100
advert_int 1 // 检查间隔,单位为秒
authentication {
auth_type PASS
auth_pass 1234
}
virtual_ipaddress { // VIP设置,指定到内网网卡
192.168.100.99/24 dev eth1
}
}
resolv-file=/etc/resolv.dnsmasq.conf cache-size=1000 conf-dir=/etc/dnsmasq.d
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有