组件:heartbeat-ldirectord---->可以让lvs+heartbeart更好的结合

  node1.example.com 192.168.0.186
 node2.example.com  192.168.0.188
 vip 192.168.0.183
 real1 192.168.10.6
 real2 192.168.10.7

 在heartbeat的基础上配置:
 yum install heartbeat-ldirectord
 cp /usr/share/doc/heartbeat-ldirectord-2.1.4/ldirectord.cf  /etc/ha.d/
 vim /etc/ha.d/ldirectord.cf
  autoreload=yes
  quiescent=yes 最好不启用persistent持久连接
  virtual=192.168.0.183:80
          real=192.168.10.6:80 gate
         real=192.168.10.7:80 gate
          fallback=127.0.0.1:80 gate
         service=http
         request=".test.html"
         receive="ok"
  scheduler=wlc
  #persistent=600
  protocol=tcp
  checktype=negotiate
         checkport=80

 vim /etc/ha.d/haresources 添加
   node1.example.com 192.168.0.183 ldirectord::ldirectord.cf
 重启heartbeat服务