首页 > Linux考试认证

在RedHatEL中实现高可用WEB负载均衡群集

时间:2009-05-11 07:23:56  作者:  我要投稿
Linux初探欢迎您的投稿,投放方法请点击这里查看,我们会定期赠送精美小礼品给优秀的投稿作者。海纳百川 取则行远!LinuxGoo欢迎您的到来。
一、Director配置  1、设置网络接口地址  [root @director root] # vi /etc/sysconfig/network-scripts/ifcfg-eth0  DEVICE=eth0  BOOTPROTO=static  BROADCAST=19......

  [root @ director ipvsadm-1.24] # make install
  由于在这里我搭建的是 WEB 的负载均衡群集,而我在安装 Redhat EL 4.0 时并没有选择安装 WEB 服务器组件,所以这里需要另外安装,如果已安装的朋友可以略过这里(注:可以用 rpm –qa |grep http 查看是否已经安装)
  [root @ director root]#tar xzvf httpd-2.2.4.tar.gz
  [root @ director root]# cd httpd-2.2.4
  [root @ director httpd-2.2.4] # ./configure –prefix=/usr/local/apache –enable-so –enable-rewrite
  [root @ director httpd-2.2.4] # make
  [root @ director httpd-2.2.4] # make install
  [root @ director httpd-2.2.4] # echo “/usr/local/apache/bin/apachectl” >> /etc/rc.local
  4、安装 heartbeat
  在安装 heartbeat 前先要安装 libnet,下载地址:http://www.packetfactory.net/libnet/
  [root @ director root] # tar xzvf libnet.tar.gz
  [root @ director root] # cd libnet
  [root @ director libnet] # ./configure
  [root @ director libnet] # make
  [root @ director libnet] # make install
  [root @ director libnet] # cd
  在安装 heartbeat 之前还需要创建属于 heartbeat 的组和用户
  [root @ director root] # groupadd –g 694 haclient
  [root @ director root] # useradd –g 694 –u 694 hacluster
  [root @ director root] # tar xzvf heartbeat-2.1.2.tar.gz
  [root @ director root] # cd heartbeat-2.1.2
  [root @ director heartbeat-2.1.2] # ./ConfigureMe configure
  [root @ director heartbeat-2.1.2] # make
  [root @ director heartbeat-2.1.2] # make install
  在安装完 heartbeat 后,会有一个 /etc/ha.d 目录,这是 heartbeat 的配置文件存放的目录,heartbeat 的配置文件都放在这里。但默认在安装完 heartbeat 后,heartbeat 最重要的三个配置文件 ha.cf、haresources、authkeys却没有放在这里,需要我们手工 copy 过来才行。
  [root @ director heartbeat-2.1.2] # cp doc/ha.cf doc/haresources doc/authkeys /etc/ha.d
  将 ldirector 的配置文件也 copy 过来
  [root @ director heartbeat-2.1.2] # cp ldirectord/ldirectord.cf /etc/ha.d
  6、编辑 heartbeat 的配置文件
  [root @ director heartbeat-2.1.2] # vi /etc/ha.d/ha.cf
  # hearbeat 的查错文件存放点
  debugfile /var/log/ha-debug
  # heartbeat的日志文件存放点
  logfile/var/log/ha-log
  #设定heartbeat(心跳)之间的时间间隔为2秒。
如果您需转载 在RedHatEL中实现高可用WEB负载均衡群集,请注明来自LinuxGoo.com,其版权归原作者所有。请广大网友留言时遵纪守法,使用文明用语。如果您在应用中有什么问题,请在下面留言,我们会尽快解答。
来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目热门