sunage001 发表于 2019-1-7 10:00:51

heartbeat 3.X 源码安装

  原码安装heartbeat
  需要三个包
1.groupadd haclient
2.useradd -g haclient hacluster
  Heartbeat-3-0-7e3a82377fa8.tar.bz2
  Reusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
  ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar
  俩台主机centos6.5
  1 安装Glue
  tar -jxvfReusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
  cdReusable-Cluster-Components-glue--glue-1.0.9
  ./autogen.sh
  报错
http://s3.运维网.com/wyfs02/M02/47/A1/wKioL1P9LxLT7bd3AAFXArIqtu0678.jpg
  yum install autoconf –y
  报错
http://s3.运维网.com/wyfs02/M01/47/A1/wKioL1P9LyXTu48HAAFjBEQh7Sg420.jpg
  Yum install automake-y
  报错
http://s3.运维网.com/wyfs02/M01/47/A0/wKiom1P9LiKji7ieAAFM3BFD79o007.jpg
  Yum installlibtool   -y
http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9LkaC-bUGAAEMEXkNfIY152.jpg
  成功
  ./configure
  报错
http://s3.运维网.com/wyfs02/M01/47/A0/wKiom1P9LlOgtkO3AACgInw3esY832.jpg
  yum install glib2-devel –y
  报错
http://s3.运维网.com/wyfs02/M02/47/A1/wKioL1P9L3qR39OeAACD5tke5gs357.jpg
  Yum installlibxml2-y
  yum install libxml2-devel –y
  报错
http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9LnLBEHnLAACH2s5Zf5Y735.jpg
  yum installbzip2-develglib2-devel   -y
http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9LoeCsZDCAAS7bx4q7C0125.jpg
  成功
  Make
  报错
http://s3.运维网.com/wyfs02/M00/47/A2/wKioL1P9L9SB-QssAAF2xqq3BLo195.jpg
  yum install -y libtool-ltdl-devel
  makeclean
  ./configure 显示http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9Lu3CnVAHAAArE5rKRIo896.jpg说明成功
  Make
  报错
http://s3.运维网.com/wyfs02/M01/47/A2/wKioL1P9MBqxNQO4AATavFoY5WQ720.jpg
  yum install libuuid-devel –y
  make clean
  ./configurehttp://s3.运维网.com/wyfs02/M00/47/A2/wKioL1P9MDuT6hm6AABVwXc9lnU451.jpg
  有luuid才能make成功
  Make
  报错
http://s3.运维网.com/wyfs02/M01/47/A2/wKioL1P9MEvCuZGiAAR8xZyit1Y876.jpg
  yum install docbook-style-xsl –y
  make clean
  ./configure
  Make
http://s3.运维网.com/wyfs02/M02/47/A2/wKioL1P9MFzhgmenAAN1Eh_eIWs360.jpg
  成功
  make install
http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9L3jiim4bAAHDEL8jJWQ218.jpg
  成功
  2 安装agent
  tar -zxvf ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar.gz
  cd ClusterLabs-resource-agents-b735277/
  ./autogen.sh
http://s3.运维网.com/wyfs02/M01/47/A2/wKioL1P9MLuBbYGjAAMRu533mU8338.jpg
  成功
  ./configure
http://s3.运维网.com/wyfs02/M01/47/A0/wKiom1P9L7aikp_ZAAPh7p0OrUw287.jpg
  成功
  Make
http://s3.运维网.com/wyfs02/M01/47/A2/wKioL1P9MPSixL42AAGtkb2uGtw156.jpg
  成功
  make install
http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9L-rRHOyCAAGFtxm65wQ105.jpg
  成功
  3 安装heartbeat
  tar -jxvfHeartbeat-3-0-7e3a82377fa8.tar.bz2
  cd Heartbeat-3-0-7e3a82377fa8
  ./bootstrap
http://s3.运维网.com/wyfs02/M01/47/A0/wKiom1P9L_7i_wLvAABql7tfU80225.jpg
  成功
  ./ConfigureMe configure
http://s3.运维网.com/wyfs02/M02/47/A2/wKioL1P9MS6CpEN4AAK0nYHzQM0145.jpg
  成功
  Make
  报错
http://s3.运维网.com/wyfs02/M02/47/A0/wKiom1P9MCfTytLdAASC4te1Nnk969.jpg
  解决办法
  解决方法:Heartbeat-3-0-7e3a82377fa8/lib/plugins/HBcomm/ucast.c
  这个文件貌似有问题,删除468行int i = 1;应该就能make了。(这个真心坑爹)
  Make
  报错
  http://s3.运维网.com/wyfs02/M02/47/A0/wKiom1P9MNyT33wZAAGC8VCeyRw205.jpg
  解决办法
  yum install docbook-style-xsl
  yum install libxslt-devel –y
  make clean
  ./ConfigureMe configure
  Make
http://s3.运维网.com/wyfs02/M01/47/A2/wKioL1P9Mgnw8PiDAAK-o49quos007.jpg
  成功
  Make install
  http://s3.运维网.com/wyfs02/M00/47/A0/wKiom1P9MQzT0h7qAAGheS9rUmM400.jpg
  成功
  拷贝doc下面的文件到/etc/ha.d/目录下:
  cpdoc/ha.cf   doc/haresource   doc/authkeys/etc/ha.d/
  配置
  cd /etc/ha.d/
  ls
  cat README
  cd /usr/share/doc/heartbeat-3.0.4/
  cpha.cfharesources authkeys/etc/ha.d/
  cd /etc/ha.d/
  vi ha.cf 更改如下
  logfile    /var/log/ha-log
  logfacility      local0
  keepalive2
  deadtime30
  warntime          10
  initdead   60
  udpport             694(最好改下,因为是广播,用同一个的话问题比较有问题)
  bcast                  eth0用eth0广播
  node               node1       (上面的为master主机)
  node                   node2(uname-n查看)
  ping                   192.168.0.254#网关
  respawnhacluster/usr/lib64/heartbeat/ipfail
  apiauth    ipfail                   gid=haclusteruid=hacluster
  vi authkeys
  auth 1
  1 crc
  chmod 600 authkeys
  vi haresources
  server51.example.com   IPaddr::192.168.0.92(VIP)/24/eth0 httpd
  俩台HA主机上要安装httpd
  scp ha.cf authkeys haresources192.168.0.194:/etc/ha.d/
  /etc/init.d/heartbeatstart
  /etc/init.d/heartbeatstart
  


  

  




页: [1]
查看完整版本: heartbeat 3.X 源码安装