美文网首页
heartbeat源码编译

heartbeat源码编译

作者: 阿栋oxo | 来源:发表于2019-03-23 10:46 被阅读0次

环境:CentOS7.4
官网下载安装包:
http://www.linux-ha.org/wiki/Downloads
百度云盘下载安装包:
链接:https://pan.baidu.com/s/1VCJ9oXY5vBE70gpBRLnKwQ
提取码:xj1h

1、glue(胶水的意思)是用来粘合Heartbeat、Pacemake以及Resource Agent的一系列类库、工具的集合
2、resource-agents为集群资源的访问提供了一系列标准的接口
3、安装heartbeat,依赖上面两个软件

#安装依赖包
yum -y install  wget gcc gcc-c++ autoconf automake libtool glib2-devel libxml2-devel bzip2 bzip2-devel \
e2fsprogs-devel libxslt-devel libtool-ltdl-devel docbook-style-xsl net-tools psmisc
#下载安装包
wget http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/958e11be8686.tar.bz2
wget http://hg.linux-ha.org/glue/archive/0a7add1d9996.tar.bz2
wget https://github.com/ClusterLabs/resource-agents/archive/v3.9.6.tar.gz
wget https://downloads.sourceforge.net/asciidoc/asciidoc-8.6.9.tar.gz
#解压安装包
tar -xf asciidoc-8.6.9.tar.gz
tar -xf 0a7add1d9996.tar.bz2
tar -xf 958e11be8686.tar.bz2 
tar -xf v3.9.6.tar.gz
#yum安装asciidoc不成功,通过源码编译
cd asciidoc-8.6.9/
./configure
make && make install
#添加 haclient 组和 hacluster 账户,这个用户主要用来配置respawn的。
groupadd haclient
useradd -g haclient hacluster
#安装Cluster Glue 1.0.12
cd Reusable-Cluster-Components-glue--0a7add1d9996/
./autogen.sh
./configure --prefix=/usr/local/heartbeat  LIBS='/lib64/libuuid.so.1'
make && make install
#安装Resource Agents 3.9.6
cd resource-agents-3.9.6
./autogen.sh
./configure --prefix=/usr/local/heartbeat  
make && make install
#安装heartbeat-3-0-6
cd Heartbeat-3-0-958e11be8686/
./bootstrap
#./confluence会报错,需要下面的操作
export CFLAGS="$CFLAGS -I/usr/local/heartbeat/include -L/usr/local/heartbeat/lib"
./configure --prefix=/usr/local/heartbeat  LIBS='/lib64/libuuid.so.1'
#make会报错,需要删除掉/usr/local/heartbeat/include/heartbeat/glue_config.h最后一行
sed -i '/^#define HA_HBCONF_DIR /d' /usr/local/heartbeat/include/heartbeat/glue_config.h
make && make install
#
cp  /usr/local/heartbeat/share/doc/heartbeat/{ha.cf,authkeys,haresources} /usr/local/heartbeat/etc/ha.d

相关文章

网友评论

      本文标题:heartbeat源码编译

      本文链接:https://www.haomeiwen.com/subject/vtwjqqtx.html