Configuration of the Linux highly available cluster scheme heartbeat v2 HTTPD highly available cluster based on Haresources profile

Source: Internet
Author: User
Tags install perl

This chapter mainly configures the HTTPD high-availability cluster based on the haresources configuration file Heartbeat v2.

650) this.width=650; "src=" Http://www.heartbeat.com/wp-content/uploads/2016/05/heartbeat-logo-300x300.png "alt=" Heartbeat "style=" padding:0px;margin:0px;vertical-align:top;border:none; "/>


ll Navigate this article

· Pre-preparation

· Installing Heartbeat v2

· Node1, Node2 host installation httpd

· SHARED-NFS Host Installation NFS

· Configuring HTTPD high-availability clusters

· Client Access Testing


  requires  

Fully master the httpd high-availability service for Heartbeat v2 based on haresources configuration files.


Pre-preparation

1, Heartbeat service host planning

Host Interface Ip Service Use
Node1.chanedu.com Eth0 192.168.1.131

Heartbeat

httpd

LAN Data forwarding

Eth1 192.168.2.131 Heartbeat Information Link

Vip 192.168.1.180

Node1.chanedu.com Eth0 192.168.1.132

Heartbeat

httpd

LAN Data forwarding

Eth1 192.168.2.132 Heartbeat Information Link
Shared.chanedu.com Eth0 192.168.1.150 Nfs LAN Data forwarding

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/94/DE/wKioL1kPLzzDNT7dAAIw_DfsRMs892.jpg "title=" heartbeat-configuration httpd high availability. jpg "width=" 730 "height=" 448 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" wkiol1kplzzdnt7daaiw_ Dfsrms892.jpg "style=" width:730px;height:448px; "/>

3. Configure the Yum source

RPM-IVH https://mirrors.ustc.edu.cn/epel/epel-release-latest-6.noarch.rpm


4. Synchronization Time

Two nodes must be the same time, you can use the network time server or local NTPD server synchronization events, I here directly synchronize network time server

Crontab-e 202.120.2.101


5, the node name and IP address must be able to parse each other, to ensure that the/etc/hosts file hostname of the positive and negative results and the name of ' uname-n ' consistent

Add the following name resolution to/etc/hosts in Node1 and Node2, respectively

echo "192.168.1.131 node1.chanedu.com node1" >>/etc/hostsecho "192.168.1.132 node2.chanedu.com node2" & Gt;>/etc/hosts


6. Configure the node heartbeat connection

Node1 and Node2 are connected using eth1 network cards, without switching, directly connected to eth1 and Node2 on Node1 with a network cable, used as heartbeat detection

The eth1:192.168.2.131 on the Node1

The eth1:192.168.2.132 on the Node2

On the Node1 and Node2 two host respectively add a host route, to achieve the two host detection peer through the ETH1 network card to achieve heartbeat detection

Add on Node1:

Route add-host 192.168.2.132 Dev eth1# This command means Access 192.168.2.132 (Node2) from Node1, go to eth1 Nic go out echo "Route Add-host 192.168.2.132 Dev eth1 ">>/etc/rc.local

Add on Node2:

Route add-host 192.168.2.131 Dev eth1# This command means Access 192.168.2.131 (Node1) from Node1, go to eth1 Nic go out echo "Route Add-host 192.168.2.131 Dev eth1 ">>/etc/rc.local


7, in order to ensure the security of communications, the use of SSH password between nodes to communicate, you can use the "ssh-keygen-t RSA" command to generate the key.

SSH-KEYGEN-T Rsassh-copy-id [email protected]


Installing Heartbeat v2

Because Heartbeat-pils is replaced by the CentOS-6.5 fallback cluster-glue, you need to manually resolve dependencies

1. Solve the dependency relationship

Yum install perl-timedate net-snmp-libs libnet PYXMLRPM-IVH heartbeat-2.1.4-12.el6.x86_64.rpm heartbeat-pils-2.1.4-12.el6.x86_64.rpm heartbeat-stonith-2.1.4-12.el6.x86_64.rpm


Note: Libnet is in the Epel source


Node1, node2 host installation httpd

Not shown here



Shared host installation NFS

Not shown here



Configuring httpd high-availability clusters



Client Access Testing


This article from "Ccschan" blog, reproduced please contact the author!

Configuration of the Linux highly available cluster scheme heartbeat v2 HTTPD highly available cluster based on Haresources profile

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.