前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Ubuntu 安装 Heartbeat 过程

Ubuntu 安装 Heartbeat 过程

作者头像
星哥玩云
发布2022-06-30 19:27:26
7860
发布2022-06-30 19:27:26
举报
文章被收录于专栏:开源部署

1. 首先建立相关用户hacluster和组haclient,然后设定环境变量,最后就是安装heartbeat

过程如下:

(1)添加用户和组

groupadd haclient useradd -g haclient hacluster

(2)设置环境变量

vi /root/.bash_profile,添加如下内容:

export PREFIX=/usr/local/ha export LCRSODIR=$PREFIX/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}

heartbeat3.x版本把安装包分成了4个部分,分别是:Cluster Glue、Resource Agents、heartbeat和pacemaker,所以要分别安装

glue下载地址:  http://hg.linux-ha.org/glue

2. 编译安装glue

tar –xjvf Reusable-Cluster-Components-glue--5e06b2ddd24b.tar.bz2 cd Reusable-Cluster-Components-glue--5e06b2ddd24b ./autogen.sh ./configure --prefix=$PREFIX  --with-daemon-user=${CLUSTER_USER} --with-daemon-group=${CLUSTER_GROUP} --enable-fatal-warnings=no make make install

3. 编译安装Agent

tar jxvf Cluster-Resource-Agents-5ae70412eec8.tar.bz2 cd Cluster-Resource-Agents-5ae70412eec8 ./autogen.sh ./configure --prefix=$PREFIX --enable-fatal-warnings=no make make install

4. 编译安装Heartbeat

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

5.编译安装Pacemaker

没有成功,最后一个错误没有能够解决,求指导!

过程中出现错误汇总:

checking for special libxml2 includes... configure: error: libxml2 config not found

解决方法:

sudo apt-get install libxml2-dev

configure: error: BZ2 Development headers not found

解决方法:

sudo apt-get install libbz2-dev

./.libs/libplumb.so: undefined reference to `uuid_clear' ./.libs/libplumb.so: undefined reference to `uuid_unparse' ./.libs/libplumb.so: undefined reference to `uuid_copy' ./.libs/libplumb.so: undefined reference to `uuid_compare' ./.libs/libplumb.so: undefined reference to `uuid_is_null' ./.libs/libplumb.so: undefined reference to `uuid_generate' ./.libs/libplumb.so: undefined reference to `uuid_parse'

解决方法:

sudo apt-get install uuid-dev

./configure --prefix=$PREFIX --with-daemon-user=${CLUSTER_USER} --with-daemon-group=${CLUSTER_GROUP} --enable-fatal-warnings=no LIBS='/lib/x86_64-linux-gnu/libuuid.so.1'

a2x -f manpage hb_report.8.txt make[2]: a2x: Command not found

解决方法:

sudo apt-get install asciidoc

configure: error: The libxslt developement headers were not found

解决方法:

sudo apt-get install libxslt1-dev

checking main() in -lplumb...no

解决方法:

sudo apt-get install libplumb2-dev

../lib/pengine/.libs/libpe_status.so: undefined reference to `stdscr' ../lib/pengine/.libs/libpe_status.so: undefined reference to `wmove' ../lib/pengine/.libs/libpe_status.so: undefined reference to `printw'

一直没找到答案,求大神指导!

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档