一、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秒。
2/6 首页 上一页 1 2 3 4 5 6 下一页 尾页 |