This is a reprinted article. Because the source code compiles through, but the shellfunc file is still missing, so I checked it from rpm Package installation, found this article. Combine this link:
http://www.howtoforge.com/high-availability-load- balancer-haproxy-heartbeat-fedora8
The configuration is basically done. One of the problems is that his master and slave are inverted! Try again tomorrow!
It’s not the first time I have introduced Heatbeat. You can easily install it through yum.Heartbeat 2.x, the information on the Internet (including my previous logs) has been introduced in detail< span style="margin:0px; padding:0px; color:black; background-color:rgb(255,255,102)">Heartbeat 2.x deployment method. And since February Heartbeat 3.0.2, released as the first 3.x Final Release version Later, the official website has been revised, and it is recommended to update from 2.x to 3.0.2, which makes it difficult to find links to many old configuration documents and instructions. In addition, I was triggered to consider using Heartbeat3, which is exactly what I used Heartbeat 2.1.3+DRBD+ during Oracle configuration Encountered a lot of bugs, see here. Although the problem is finally resolved, but without official support, future maintenance may encounter difficulties. For long-term consideration, using Heartbeat 3 is imperative.
Fortunately, Heartbeat 3 Comparison Heartbeat The actual difference between 2.x is not big, and you can even put Heartbeat 3 understood as Heartbeat 2.x The version after splitting into modules, and the configuration methods are similar. Therefore, the biggest difficulty encountered during actual deployment is installation. The official information provides the source code. I don’t like to deploy the software on the generation system using source code. This will cause big problems for subsequent maintenance. Through hard work, I finally successfully compiled a set of heartbeat 3.0.3 with GUI management rpm.
1. About Heartbeat 3
1. Version issues
Heartbeat The last official STABLE release 2.x version is 2.1.4.
Although Fedora, OpenSUSE and other projects have provided 2.99, 3.0, etc.rpm version, but in fact the version is based on Heartbeat 3.0 Compiled with 3.0.1 source code. At present, the Heartbeat 3 introduced in most materials on the Internet also uses this version.
Heartbeat 3 Official release The first version is 3.0.2, which is also to distinguish the 2.99 mentioned above. In addition, due to the official release of 3.0.2, the download address originally provided by OpenSUSE has also been deleted.
For more detailed information, please see: Announce: Final Release of Heartbeat 3.0.2, Cluster-Glue 1.0.2, and Resource-Agents 1.0.2.
These principlesHeartbeat 3 and 2.x is basically the same. If you have any questions, please refer to: [Original]heartbeat 2 .x infrastructure.
2, composition
Heartbeat 3 and 2 The biggest difference of .x is that 3 separates the original 2.x into multiple sub-projects by module, and provides a cluster-glue component dedicated to the management of Local ResourceManager. That is heartbeat + cluster-glue +resouce-agent three parts:
(2) cluster-glue is equivalent to an intermediate Layer, you can link heartbeat and crm (pacemaker), which mainly contains 2 parts, LRM and STONITH;
(3) resource-agent, is the ocf script of various resources, these scripts will be called by LRM to realize the start, stop, and monitoring of various resources and many more.
through this The three parts can form a complete HA cluster system. However, this is not enough because there are no management tools.
The original GUI tool Cluster Resource Manager (CRM for short) has also been split and taken care of by another independent project, Pacemaker. Pacemaker provides a variety of user interfaces:
(2) A web konsole window using Ajax Web configuration;
(3) hb_gui, ie heartbeat gui graphic configuration tool, which is also the default GUI configuration tool for 2.x;
(4) DRBD-MC, a Java-based configuration management tool.
more details For introduction, please see: here.
Choose one of the above user management interfaces. It should be noted that in the Cluster Stacks supported by Pacemaker, in addition to Heartbeat, OpenAIS is also supported. However, the content of OpenAIS is beyond the scope of this article and will be introduced later.
2. About rpmpackage
1, Heartbeat rpm
Heartbeat 3 Available on the official websiteHeartbeat 3.0.3, Cluster Glue 1.0.5, Resource Agents 1.0.3 source code. Download, compile and install.
If you, like me, don’t like to use source code to deploy production systems, you can use the spec in the source package to compile. When compiling, pay attention to creating the directory in the corresponding source package, the variable setting in the spec, etc., but the overall problem is not big.
Better yet, in the Install article of Pacemaker, the installation package of EPEL is provided. If your system is Asianux, RHEL, CentOS, etc., you can use the following method Installation:
wget -O /etc/yum.repos.d/pacemaker.repo http://clusterlabs.org/ rpm/epel-5/clusterlabs.repo
yum install -y pacemaker corosync heartbeat
Or, directly click the link below to get the corresponding rpm, or source code src.rpm span>:
http://www.clusterlabs.org/rpm/epel-5/
http://www.clusterlabs.org/rpm/epel-5/src/
through the above installation process , The system has provided an environment for building Heartbeat 3, including crm command line configuration and management tools ( Provided by pacemaker). However, the hb_gui graphical configuration tool is not included.
※ Note that I did not install ldirectord here because I LVS is not used. If you need to monitor LVS, you can install it yourself.
2, Pacemaker Python GUI
As mentioned above, this is a GUI configuration management tool provided by Pacemaker, which is heartbeat hb_gui in 2.x.
The official website is: http://hg.clusterlabs.org/pacemaker/pygui
In some Heartbeat version, such as 2.99 provided by Fedora itself, called pacemaker-pygui-1.4, and The latest version is 2.0 and has been renamed: pacemaker-mgmt-2.0.0.
When compiling, you may encounter some problems:
a, AC_PROG_INTLTOOL report error
For example:
# ./bootstrap
Autoconf package autoconf found.
……
./configure: line 2064: syntax error near unexpected token `0.35.2′
./ configure: lin e 2064: `AC_PROG_INTLTOOL(0.35.2)’
< br style="margin:0px; padding:0px"> The reason is that a dependency package intltool-0.35.0-2 is missing. After installation, run:
( 2) cluster-glue is equivalent to an intermediate layer, which can be
Quotation
(1) Hearbeat itself is the basis of the entire cluster (cluster messaging layer), responsible for maintaining the information of each node in the cluster and their previous communications;
(2) cluster-glue is equivalent to an intermediate layer, you can change heartbeat is linked with crm (pacemaker), and it mainly consists of two parts, LRM and STONITH;
(3) resource-agent, which is various The ocf script of the resource, these scripts will be called by LRM to realize the start, stop, monitoring and so on of various resources.
(2) a web konsole window using Ajax Web configuration;
(3) hb_gui, that is heartbeat gui graphic configuration tool, This is also the original 2.x default GUI configuration tool;
(4) DRBD-MC, a Java-based configuration management tool.
Quotation
(1) crm shell character-based management;
(2) One using Ajax The web konsole window of the web configuration mode;
(3) hb_gui, namely heartbeat gui graphical configuration tool, which is also the default GUI configuration tool for 2.x;
(4) DRBD-MC, one based on Java configuration management tool.
rpm -Uvh http://download.fedora.redhat .com/pub/epel/5/x86_64/epel-release-5-3.noarch. rpm< /span>
wget -O /etc/yum.repos.d/pacemaker.repo http://clusterlabs.org/ rpm/epel-5/clusterlabs.repo
yum install -y pacemaker corosync heartbeat
Autoconf package autoconf found.
……
./configure: line 2064: syntax error near unexpected token `0.35.2′
./configure: line 2064: `AC_PROG_INTLTOOL(0.35.2)’
quote
# tar xvjf Pacemaker-Python-GUI-.tar.bz2
# ./bootstrap
Autoconf package autoconf found.
……
./configure: line 2064: syntax error near unexpected token `0.35.2’< br style="margin:0px; padding:0px"> ./configure: line 2064: `AC_PROG_INTLTOOL(0.35.2)’
# autoreconf -ifs # ./bootstrap
WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2536 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC