环境:centos6.3_x64、minimal installation
安装heartbeat3.0需要安装四个包,分别是Reusable-Cluster-Components-glue、Cluster-resource-agents、Heartbeat、Pacemaker
这些是我花了一上午的时间总结出来的。中间遇到了很多问题,这里没有指出来,比如包的依赖性等问题。我遇到的所有的问题,只要可以按照下面的操作执行都可以解决掉。
安装heartbeat包需要cluster glue包的依赖性,所以需要首先安装Reusable-Cluster-Components-glue。
1、安装cluster glue
依赖性:gcc、flex、bison、net-snmp、OpenIPMI、python、libtool、make、pkgconfig、glib2-devel、libxml2、libxml2-devel、bzip2、bzip2-devel、libtool-ltdl、libtool-ltdl-devel、libuuid-devel、libuuid、libxslt、libxslt-devel、corosync、corosync-devel、intltool
mkdir /usr/local/heartbeat
groupadd haclient
useradd -g haclient hacluster
tar -zxvf /var/ftp/pub/ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar.gz -C /tmp/
./autogen.sh
./configure --prefix=/usr/local/heartbeat/ CFLAGS=-I/usr/local/heartbeat LIBS="/lib64/libuuid.so.1"
make
make install
2、安装Resource Agents
tar -zxvf ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar.gz
./autogen.sh
./configure --prefix=/usr/local/heartbeat/ CFLAGS=-I/usr/local/heartbeat/include LDFLAGS=-L/usr/local/heartbeat/lib LIBS="/lib64/libuuid.so.1"
make
make install
3、安装heartbeat
tar -jxvf /var/ftp/pub/Heartbeat-3-0-7e3a82377fa8.tar.bz2 -C /tmp/
./bootstrap
编辑vim /usr/local/heartbeat/include/heartbeat/glue_config.h,(来自:http://blog.chinaunix.net/uid-17268883-id-3139755.html)
删除第50行和第150行
./configure --prefix=/usr/local/heartbeat/ CFLAGS=-I/usr/local/heartbeat/include LDFLAGS=-L/usr/local/heartbeat/lib LIBS="/lib64/libuuid.so.1"
make
make install
cp doc/{ha.cf,haresources,authkeys} /usr/local/heartbeat/etc/ha.d/
4安装pacemaker
tar -jxvf /var/ftp/pub/Pacemaker-1-0-c3869c00c759.tar.bz2 -C /tmp
ln /usr/lib64/libcpg.so.4 /usr/local/heartbeat/lib64/libcpg.so
ln /usr/libexec/lcrso/ /usr/local/heartbeat/lib64/lcrso
./autogen.sh
./configure --prefix=/usr/local/heartbeat/ CFLAGS=-I/usr/local/heartbeat/include LDFLAGS=-L/usr/local/heartbeat/lib LIBS="/lib64/libuuid.so.1"
make
make install
阅读(6376) | 评论(0) | 转发(0) |