Install Heartbeat in Ubuntu

Source: Internet
Author: User

1. First create the relevant user hacluster and the 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 content:

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 divides the installation package into four parts: Cluster Glue, Resource Agents, heartbeat, and pacemaker.

Glue: http://hg.linux-ha.org/glue

2. Compile and install 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. Compile and install the 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. Compile and 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

5. Compile and install Pacemaker

 

Failed. The last error cannot be solved!

Summary of errors during the process:

 

Checking for special libxml2 implements des... configure: error: libxml2 config not found

Solution:

Sudo apt-get install libxml2-dev

 

Configure: error: BZ2 Development headers not found

Solution:

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'

Solution:

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

Solution:

Sudo apt-get install asciidoc

 

Configure: error: The libxslt developement headers were not found

 

Solution:

Sudo apt-get install libxslt1-dev

 

Checking main () in-lplumb... no

Solution:

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'

I have never found the answer. Please kindly advise!

Recommended reading:

Heartbeat for Linux high availability (HA) Cluster Based on crm

Heartbeat + httpd + NFS for highly available Web Servers

Heartbeat for Linux high availability (HA) CLUSTERS

Heartbeat CRM configuration for Linux high availability solution

High-availability cluster Heartbeat v1 instance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.