|
在vmware虚拟机中安装了两个centos5.5系统进行测试了一下,先安装keepalived ,具体安装过程可以参考http://blog.csdn.net/jiedushi/archive/2009/07/25/4379372.aspx
master主机配置如下
- global_defs { ####全局定义
- notification_email { #####指定keepalived在发生事件时(比如切换),需要发送的email对象,可以多个,每行一个
- sdj@qq.com
- }
- notification_email_from sdj@qq.com
- smtp_server 127.0.0.1 #####指定发送email的smtp服务器
- smtp_connect_timeout 30
- router_id LVS_DEVEL #######运行keepalived的机器的一个标识
- }
- vrrp_sync_group VG1 {
- group {
- VI_1
- VI_2
- }
- }
- vrrp_instance VI_1 {
- state MASTER
- interface eth0
- track_interface {
- eth0
- eth1
- }
- vrrp_script chk_http_port {
- #script "/opt/nginx_pid.sh" ###监控脚本
- script "
|
|
|