设为首页 收藏本站
查看: 883|回复: 0

[经验分享] Heartbeat3.x安装、错误记录

[复制链接]

尚未签到

发表于 2019-1-6 15:30:10 | 显示全部楼层 |阅读模式
  本想依照南非蚂蚁的博客安装配置一下heartbeat3,但是发现安装的过程很曲折,特在此记录一下安装过程中的问题及解决办法,希望别人能少走弯路。
  安装可参考该英文网站:http://clusterlabs.org/wiki/Install#From_Source
  http://ixdba.blog.运维网.com/2895551/746271
  首先:
yum install autoconf automake libtool glib2-devel libxml2-devel bzip2-devel e2fsprogs-devel libxslt-devel


1、添加用户和组



  • # groupadd haclient
  • # useradd -g haclient hacluster


2、设置变量



  • vim /root/.bash_profile
  • 添加:
  • export PREFIX=/usr/local/ha
  • export LCRSODIR=/usr/libexec/lcrso
  • export CLUSTER_USER=hacluster
  • export CLUSTER_GROUP=haclient
  • export CFLAGS="$CFLAGS -I$PREFIX/include -L$PREFIX/lib"
  • getent group ${CLUSTER_GROUP} >/dev/null || groupadd -r ${CLUSTER_GROUP}
  • getent passwd ${CLUSTER_USER} >/dev/null || useradd -r -g ${CLUSTER_GROUP} -d /var/lib/heartbeat/cores/hacluster -s /sbin/nologin -c "cluster user" ${CLUSTER_USER}
  •   
  • source /root/.bash_profile


3、安装各个模块软件包
1)安装Cluster Glue



  • tar jxvf Reusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
  • cd Reusable-Cluster-Components-glue--glue-1.0.9
  • ./autogen.sh
  • ./configure --prefix=$PREFIX  --with-daemon-user=${CLUSTER_USER} --with-daemon-group=${CLUSTER_GROUP} --enable-fatal-warnings=no
  • make


错误:
/usr/bin/xsltproc \
--xinclude \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl hb_report.xml
error : Operation in progress
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
gmake[2]: *** [hb_report.8] 错误 4
gmake[2]: Leaving directory `/usr/local/src/heartbeat/Reusable-Cluster-Components-glue--glue-1.0.9/doc'
gmake[1]: *** [all-recursive] 错误 1
gmake[1]: Leaving directory `/usr/local/src/heartbeat/Reusable-Cluster-Components-glue--glue-1.0.9/doc'
make: *** [all-recursive] 错误 1
解决:
yum -y install docbook*




  • make install


2)安装Resource Agents



  • tar zxvf ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar.gz
  • cd ClusterLabs-resource-agents-b735277/
  • ./autogen.sh


出现错误:
configure.ac:9: error: Autoconf version 2.63 or higher is required
解决:
下载并安装autoconf-2.68.tar.gz
./configure
make;make install

出现错误:
configure.ac:63: require Automake 1.10.1, but have 1.9.6
解决:
下载并安装automake-1.11.2.tar.gz




  • ./configure --prefix=$PREFIX CFLAGES=-I/usr/local/ha/include  LDFLAGS=-L/usr/local/ha/lib
  • make


错误:
../heartbeat/IPv6addr: error while loading shared libraries: libplumb.so.2: cannot open shared object file: No such file or directory
解决:
vim /etc/ld.so.conf.d/heartbeat.conf(没有heartbeat.conf,自己创建)
ldconfig
然后进行make,注意如果前面make错误,使用make clean ,然后重新编译再make




  • make install


3)安装heartbeat



  • tar jxvf Heartbeat-3-0-7e3a82377fa8.tar.bz2
  • cd Heartbeat-3-0-7e3a82377fa8
  • ./bootstrap
  • ./configure --prefix=$PREFIX --enable-fatal-warnings=no
  • make
  • make install


4)安装pacemaker(使用1.0.12,使用1.1.2编译不过去,有问题)



  • tar zxvf pacemaker-1.0.12.tar.gz
  • cd ClusterLabs-pacemaker-1.0-066152e/
  • ./autogen.sh


错误:
configure.ac:81: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:82: error: possibly undefined macro: AC_LIBLTDL_CONVENIENCE
configure.ac:83: error: possibly undefined macro: AC_PROG_LIBTOOL
解决:
yum -y install libtool libtool-libs



  • ./configure --prefix=/usr/local/ha --with-heartbeat CFLAGES=-I/usr/local/ha/include  LDFLAGS=-L/usr/local/ha/lib64


编译的时候报错:
checking location of OpenAIS libraries... ls: /usr/local/ha/*/libcpg.so: No such file or directory
解决:
修改configure,找到alib=`ls ${AISPREFIX}/*/libcpg.so | head -n 1`修改为:
alib=`ls ${AISPREFIX}/libcpg.so | head -n 1`,重新编译




  • make
  • make install
  • ldconfig -v


5)安装图像管理工具Pacemaker-Python-GUI(因为使用的Pacemaker1.0的版本,所以这个使用2.0,不要使用官方推荐的,官方推荐的是针对Pacemaker1.2的)



  • tar jxvf Pacemaker-Python-GUI-18332eae086e.tar.bz2
  • cd Pacemaker-Python-GUI-18332eae086e
  • ./bootstrap --prefix=/usr/local/ha CFLAGES=-I/usr/local/ha/include  LDFLAGS=-L/usr/local/ha/lib64
  •   

如果出现错误:
报错如下:aclocal:configure.in:57: warning: macro `AM_PO_SUBDIRS‘ not found in library
> autoheader
> libtoolize –ltdl –force –copy
> aclocal-1.9
> aclocal:configure.in:57: warning: macro `AM_PO_SUBDIRS‘ not found in library
> automake-1.9 –add-missing –include-deps –copy
> configure.in: installing `./install-sh’
> configure.in: installing `./missing’
> cim/Makefile.am: installing `./depcomp’
> lib/mgmt/Makefile.am: installing `./compile’
> autoconf
> configure.in:56: error: possibly undefined macro: AC_PROG_INTLTOOL
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
> configure.in:57: error: possibly undefined macro: AM_PO_SUBDIRS

解决:
安装gettextintltool
yum -y install gettext*  intltool




  • make


如果出现错误:
mgmt_tls_lib.c:31:27: error: gnutls/gnutls.h: No such file or directory
解决办法:
yum -y install gnutls*
ldconfig
make clean
重新./configure
然后再make




  • make install





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-660037-1-1.html 上篇帖子: Heartbeat+Haproxy实现负载均衡高可用 下篇帖子: redhat6.2 x86_64 heartbeat的yum源
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表