CentOS 6 高可用服务 Heartbeat v3 安装以及配置

系统:CentOS 6.6 x86_64(两台虚拟机)
安全:SElinux disabled
网络:业务网络 + 心跳网络
Heartbeat版本:v3.0.6
Cluster Gule版本:v1.0.12

Resource Agents版本:v3.9.6

软件包安装方式:源码安装

Heartbeat 3.0以后是由 gule、heartbeat、agents 三部分组成。因此,我们需要分别安装。
事先必须安装好必要的基础工具及编译工具:
gcc 系列

flex 和 bison编译解析

net-snmp开发头文件

OpenIPMI 开发头

Python解释器

添加运行 heartbeat的用户和组 (在主备服务器上都需要有该操作)

#groupadd -r haclient
#useradd -r -g haclient -M -s /sbin/nologin hacluster

下载安装 Cluster Gule
#wget -O Glue_1.0.12.tar.bz2  
#tar xf Glue_1.0.12.tar.bz2 
#cd Reusable-Cluster-Components-glue--0a7add1d9996/
#bash autogen.sh 
#./configure  LIBS='/lib64/libuuid.so.1'
 
      .......................
cluster-glue configuration:
  Version                  = 1.0.12 (Build: 0a7add1d9996b6d869d441da6c82fb7b8abcef4f)
  Features                =
 
  Prefix                  = /usr
  Executables              = /usr/sbin
  Man pages                = /usr/share/man
  Libraries                = /usr/lib64
  Header files            = /usr/include
  Arch-independent files  = /usr/share
  Documentation            = /usr/share/doc/cluster-glue
  State information        = /usr/var
  System configuration    = /usr/etc
 
  Use system LTDL          = yes
 
  HA group name            = haclient
  HA user name            = hacluster
 
  CFLAGS                  = -g -O2 -ggdb  -fgnu89-inline -fstack-protector-all -Wall -Waggregate-return -Wbad-function-cast -Wcast-qual -Wcast-align -Wdeclaration-after-statement -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wformat-nonliteral -Winline -Wmissing-prototypes -Wmissing-declarations -Wmissing-format-attribute -Wnested-externs -Wno-long-long -Wno-strict-aliasing -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -ansi -D_GNU_SOURCE -DANSI_ONLY -Werror
  Libraries                = -lbz2 -lz -lxml2 -lc -lrt -ldl /lib64/libuuid.so.1 -lglib-2.0  -lltdl
  Stack Libraries          = 
   
#make -j 2 && make install

下载安装 Heartbeat
#wget -O Heartbeat_3.0.6.tar.bz2 
#tar xf  Heartbeat_3.0.6.tar.bz2 
#cd Heartbeat-3-0-958e11be8686/
#./bootstrap 
#./configure 
  .......
configure: WARNING: stdocdir directory () does not exist!
configure: WARNING: value/default "--localstatedir=/usr/local/var" is poor.
configure: WARNING: "/var/something" is strongly recommended.
configure: WARNING: We also recommend using "ConfigureMe".    //使用configureMe
configure: WARNING: Sleeping for 10 seconds.
  ......
 
#./ConfigureMe configure LIBS=/lib64/libuuid.so.1
 
...........
heartbeat configuration:
  Version                  = "3.0.6"
  Executables              = "/usr/sbin"
  Man pages                = "/usr/share/man"
  Libraries                = "/usr/lib64"
  Header files            = "/usr/include"
  Arch-independent files  = "/usr/share"
  Documentation files      = "/usr/share/doc/heartbeat"
  State information        = "/var"
  System configuration    = "/etc"
  Init (rc) scripts        = "/etc/rc.d/init.d"
  Init (rc) defaults      = "/etc/sysconfig"
  Use system LTDL          = "yes"
  HA group name            = "haclient"
  HA group id              = "499"
  HA user name            = "hacluster"
  HA user user id          = "498"
  Build dopd plugin        = "yes"
  Enable times kludge      = "yes"
  CC_WARNINGS              = " -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror "
  Mangled CFLAGS          = "-g -O2  -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror  -ggdb3 -funsigned-char"
  Libraries                = "-lbz2 -lz -lc -lrt -ldl  -lltdl"
  RPATH enabled            = "no"
  Distro-style RPMs        = "no"
   
Note: If you use the 'make install' method for installation you
also need to adjust '/etc/passwd' and '/etc/group' manually.
 
#make -j 2 && make install
 
////////////make的时候报错 
/usr/bin/xsltproc \ 
–xinclude \ 
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  
gmake[2]: *** [hb_report.8] Error 4
gmake[2]: Leaving directory `/heartbeat/Reusable-Cluster-Components-glue–5e06b2ddd24b/doc’ 
yum install docbook-style-xsl -y
 
#make -j 2 && make install

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/551c2ace1353d209965a33f2cdb1c3db.html