First set up three virtual host nodes of CentOS6.9 as follows, and have configured mutual trust between the two machines. Refer to the previous article High-availability cluster Heartbeat configuration practice
1)10.20.10.140 node1.walkingcloud.cn node1
2)10.20.10.141 node2.walkingcloud.cn node2
3)10.20.10.142 node3.walkingcloud.cn node3
1、 Yum install cman rgmanager ricci installs the RHCS cluster suite on all three nodes, and the httpd service is installed on each yum install -y httpd
echo "
echo "
echo "
2、 Set the same password for the ricci user with passwd ricci on each node
service ricci start and start ricci services
chkconfig ricci on
3、 Install yum install luci graphical management interface on node1
service luci start starts luci, chkconfig luci on
4、 Log in to the luci management interface of node1, https://node1's IP:8084
Enter the root account and password of node1
5、 Create Cluster walkingcloud
And add three nodes to the cluster
6、 Set failover
7、 Add resource
1 ) IP address resource VIP 10.20.10.145/23
2 ) Service script resources
8、 Add resource group, bind IP address and httpd service resource
8、 Start the HA service first, and let the resource services run on node1
9、 Failure migration, test HA function
Restart node1 and check the cluster service logs on the other two nodes
tail -f /var/log/cluster/rgmanager.log and clusstat to view cluster status
As shown in the figure below, you can see that the service is running on node2 on node2, and ip addr is also automatically migrated to node2
Just a simple test of the HA function of the RHCS cluster, after learning GFS, cLVM and other related knowledge, we will introduce further
Recommended Posts