In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to achieve pacemaker high availability installation configuration in Centos7, which is very detailed and has certain reference value. Friends who are interested must read it!
Centos7 configuration pacemaker official documentation address:
Https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Administration/ch-startup-HAAA.html
Pacemaker uses translation: http://clusterlabs.org/doc/zh-CN/Pacemaker/1.1/html-single/Clusters_from_Scratch/
Pacemaker's key features include:
Monitor and recover node and service level failures
Storage is independent and there is no need for shared storage
Resource independent, any resource that can be controlled by script can be used as a service
Supports fencing (also referred to as the STONITH acronym, deciphered later on) for ensuring data integrity
Support large or small clusters
Supports both quorate and resource-driven clusters
Supports practically any redundancy configuration
Automatically synchronize the configuration files of each node
You can set ordering and colocation and anti-colocation within the cluster scope.
Support for advanced service types
Clones: prepared for services to run on multiple nodes
Multi-state: for services with multiple modes (e.g. Master/slave, primary/secondary)
Unified, scriptable cluster management tools
The environment of this experiment:
Centos7.1
Node31:172.31.2.31
Node32: 172.31.2.32
Pacemaker is installed on both node31 and node32 machines, so the following operations need to be performed on two-day machines.
1. Configure the firewall port and turn off selinux
Systemctl disable firewalld
Systemctl stop firewalld
Iptables-F
2. Configure hostname:
Hostnamectl-static-transient set-hostname node31
Hostnamectl-static-transient set-hostname node32
Vim / etc/hosts
3. Time synchronization:
Yum install ntp-y
Ntpdate cn.pool.ntp.org
4. Mutual trust between two computers (it is found in this experiment that there seems to be no problem without mutual trust between two computers):
Ssh-keygen-t rsa
Note: perform the same mutual trust operation on node32.
5. Install the components related to pacemaker cluster:
Yum install pcs pacemaker corosync fence-agents-all-y
6. Start the pcsd service (boot self-starting)
Systemctl start pcsd. Service
Systemctl enable pcsd. Service
7. Create cluster users:
Passwd hacluster (created automatically by this user when installing pcs)
9. Create and start a cluster named my_cluster, where node31 node32 is a cluster member:
Pcs cluster setup-start-name my_cluster node31 node32
11. View and set cluster properties:
View the current cluster status:
Pcs cluster status
Check the pacemaker service:
Ps aux | grep pacemaker
12. Pcs resource resource attribute configuration:
Pacemaker / Corosync is a group of high availability cluster systems commonly used under Linux. Pacemaker itself already comes with the management functions of many common applications. But if you want to use Pacemaker to manage your own implemented services or services that are not readily available, you need to implement a resource yourself.
Among them, the resource management programs included in Pacemaker are all under / usr/lib/ocf/resource.d. The heartbeat directory contains the common services that come with it. The scripts for those services can be used as a reference for our own implementation.
For more information about custom resources, please refer to the blog: http://blog.csdn.net/tantexian/article/details/50160159
Next, we will briefly explain some commonly used pcs commands.
View the usage of pcs resource for resource operations:
Pcs resource help
View the resource agent standards supported by pcs:
Pcs resource providers
Specific apache usage:
Pcs resource describe ocf:heartbeat:apache
These are all the contents of the article "how to implement pacemaker High availability installation configuration in Centos7". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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
© 2024 shulou.com SLNews company. All rights reserved.