In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Linux installation heartbeat 3.0 cluster source code how to write, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
First, prepare in advance.
1. Hardware necessary for Heartbeat cluster
The necessary hardware devices for building a Heartbeat cluster system are:
Node servers, network and network cards, shared disks
2. Operating system planning
Each node server has two network cards, one for connecting to the public network and the other for heartbeat monitoring by connecting two nodes through an Ethernet crossover line.
3dint IP planning
Node Typ
Ip address
Hostnam
Types
Primary Node (rhel 5.5)
Eth0:18.1.30.60
Priv3.wolf.org
Private
Eth2:192.168.87.130
Test3.wolf.org
Public
Eth2:0 192.168.87.100
Virtual
Standby node (rhel 6. 0)
Eth0:18.1.30.61
Priv4.wolf.org
Private
Eth2:192.168.87.144
Test4.wolf.org
Public
4. Domain name resolution
[root@test3 ~] # vim / etc/hosts
127.0.0.1 localhost.localdomain localhost
18.1.30.60 priv3.wolf.org priv3
18.1.30.61 priv4.wolf.org priv4
192.168.87.130 test3.wolf.org test3
192.168.87.144 test4.wolf.org test4
5, the necessary software packages
Yum install-y libxml2libxml2-devel bzip2-devel glib2-devel gettext intltool autoconf automake libtool-ltdl-devel libuuid-devel pkgconfig libxslt-devellibtool
Second, install heartbeat
The installation here is based on heartbeat3.x. The following operations need to be installed on both nodes. The basic installation process is as follows:
First, establish the relevant user hacluster and group haclient, then set the environment variables, and finally install heartbeat. The process is as follows:
1. Add users and groups
Groupadd haclient
Useradd-g haclient hacluster
2. Set environment variables
Vi / root/.bash_profile, add the following:
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 "clusteruser" ${CLUSTER_USER}
The heartbeat3.x version divides the installation package into four parts, namely: ClusterGlue, Resource Agents, heartbeat and pacemaker, so to install them separately, you can download the corresponding software packages from http://hg.linux-ha.org and http://hg.clusterlabs.org. The software versions used here are:
Glue-1.0.9, ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar, heartbeat-STABLE-3.0.4, Pacemaker-1.0.10
1) install Cluster Glue
Tar jxvfReusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
Cd Reusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
. / autogen.sh
. / configure-- prefix=$PREFIX--with-daemon-user=$ {CLUSTER_USER}-- with-daemon-group=$ {CLUSTER_GROUP}-- enable-fatal-warnings=no
Make
Make install
Note:
(1) configure:WARNING: no configuration information is in libltdl indicates that there is a software package that is not installed. This package is libtool-ltdl-devel.
2) install Resource Agents
Tar jxvfCluster-Resource-Agents-5ae70412eec8.tar.bz2
Cd Cluster-Resource-Agents-5ae70412eec8
. / autogen.sh
. / configure-prefix=$PREFIX-enable-fatal-warnings=no
Make
Make install
3) install 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
4) install pacemaker
Tar jxvfPacemaker-1-0-c3869c00c759.tar.bz2
Cd Pacemaker-1-0-c3869c00c759
. / autogen.sh
. / configure-prefix=$PREFIX--with-lcrso-dir=$LCRSODIR-enable-fatal-warnings=no
Make
Make install
5) install the image management tool Pacemaker-Python-GUI
Tar jxvfPacemaker-Python-GUI-18332eae086e.tar.bz2
Cd Pacemaker-Python-GUI-18332eae086e
. / bootstrap-- prefix=$PREFIX CFLAGS= "$CFLAGS-I$PREFIX/include-L$PREFIX/lib64"
Make
Make install
The following error may occur: aclocal:configure.in:57: warning: macro `AM_PO_SUBDIRS' not found inlibrary. / configure: line 2064: syntax error near unexpected token `0.35.2'./configure: line 2064: `AC_PROG_INTLTOOL (0.35.2) 'only need to install gettext and intltool packages
Third, install and troubleshoot
1. Libtoolize: `COPYING.LIB 'not found in `/ usr/share/libtool/libltdl'
Solution:
Yum-y install libtool-ltdl-devel
2 、 checking forspecial libxml2 includes... Configure: error: libxml2 config not found
Solution:
Yum-y install libxml2
3 、 configure:error: BZ2 libraries not found
Solution:
Yum-y install bzip2-devel glib2-devel
The first three feelings are common sense problems, and if you often install source packages, this kind of error should be very easy.
4. Install Reusable-Cluster-Components-glue--glue-1.0.9
. / .libs / libplumb.so: undefined reference to`uuid _ parse'
. / .libs / libplumb.so: undefined reference to`uuid _ generate'
. / .libs / libplumb.so: undefined reference to`uuid _ copy'
. / .libs / libplumb.so: undefined reference to`uuid _ is_null'
. / .libs / libplumb.so: undefined reference to`uuid _ unparse'
. / .libs / libplumb.so: undefined reference to`uuid _ clear'
. / .libs / libplumb.so: undefined reference to`uuid _ compare'
Collect2: ld returned 1 exit status
Gmake [2]: * * [ipctest] Error 1
Gmake [2]: Leaving directory` / root/Reusable-Cluster-Components-glue-1.0.6/lib/clplumbing'
Gmake [1]: * * [all-recursive] Error 1
Gmake [1]: Leaving directory` / root/Reusable-Cluster-Components-glue-1.0.6/lib'
Make: * * [all-recursive] Error 1
Solution:
. / configure-- prefix=$PREFIX-- with-daemon-user=$ {CLUSTER_USER}-- with-daemon-group=$ {CLUSTER_GROUP}-- enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1'
Specify LIBS in. / configure, and change it to LIBS='/lib/libuuid.so.1' if it is a 32-bit system. The following ClusterLabs-resourceHeartbeat is specified in. / configure, or continue to report errors.
5 、
Uuid_parse.c:250: error: expected';',','or') 'before' uu'
Uuid_parse.c:469: error: expected') 'before' out'
Uuid_parse.c:484: error: expected') 'before' out'
Uuid_parse.c:512: error: expected') 'before' out'
Gmake [1]: * * [uuid_parse.lo] Error 1
Gmake [1]: Leaving directory` / usr/src/Heartbeat-3-0-7e3a82377fa8
Make: * * [all-recursive] Error 1
Solution:
#. / configure-prefix=$PREFIX--enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1'
six,
Gmake [1]:-- xinclude: Command not found
Gmake [1]: * * [heartbeat.8] Error 127
Gmake [1]: Leaving directory` / usr/src/Heartbeat-3-0-7e3a82377fa8
Make: * * [all-recursive] Error 1
Solution:
# yum-y install libxslt-devel
seven,
Error: Operation in progress
Warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl"
Compilation error: file http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl line 46element include
Xsl:include: unable to load http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl
Http://docbook.sourceforge.net/release/xsl/current/html/table.xsl:1:parser error: Document is empty
Http://docbook.sourceforge.net/release/xsl/current/html/table.xsl:1:parser error: Start tag expected,'
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
LH garbled conversion lr_convert_string_encoding (lr_eval_string), "utf-8", "gb2312", "returnMsg")
© 2024 shulou.com SLNews company. All rights reserved.