RHCS, Red Hat cluster suite, as for the principle of performance what I do not say here, very complex is also very uninteresting, and online 100 times introduce RHCs article, usually is just in the same way with a language in the same kind of thinking, some even pinyin error is the same, very boring, We are interested to search by ourselves. All right, spit out the groove and start the experiment today!
Prepare :
One console (node1.xue.com), need to install Luci and ansible;
Three do cluster, and be controlled machine (node2.xue.com, node3.xue.com, node4.xue.com), need to install Ricci;
Configure the Yum source;
First, configuration Management desk
1, installation Ansible
You can either compile the installation or use the Yum installation, which is installed here using Yum:
Yum-y Install python-jinja2 pyyaml Python-paramiko python-babel python-crypto//Resolve dependencies yum-y Install Ansible
2, installation Luci:
Yum-y Install Luci--disablerepo=epel
3, Configuration ansible:
We need to use ansible to manage the other three servers, so we want to configure the new group in/etc/ansible/hosts:
[[email protected] ~]# vim/etc/ansible/hosts//Add the following to the file: [RHCs] # #被管理机组名node2. xue.com # #被管理机, The same node3.xue.comnode4.xue.com//need to be explained that in the absence of DNS, you need to define a host entry in the host's/etc/hosts file, or use an IP address instead of using a host name.
4, Management machine and managed to build SSH trust (in fact, only need to be managed machine Trust Management machine, that is only required to operate on the control machine):
The process is as follows: # ssh-keygen-t Rsa-p "//According to the prompts, follow-up is the default # Ssh-copy-id. ssh/id_rsa.pub [Email protected]//Send the public key to a host that needs to trust itself, all actions by default
This way, the console is already configured so that we can operate it.
Second, the configuration RHCs
1, test the managed machine connectivity: 650) this.width=650; "title=" Image 05031703 (2). jpg "alt=" wkiom1nksd-tglataaen_vfx4rm751.jpg "src="/http S3.51cto.com/wyfs02/m00/25/90/wkiom1nksd-tglataaen_vfx4rm751.jpg "/>
2, first synchronization group member system time: 650) this.width=650; "title=" Image 05031705.jpg "alt=" wkiol1nksg7i5btyaaiodu3tsdc959.jpg "src="/http S3.51cto.com/wyfs02/m00/25/91/wkiol1nksg7i5btyaaiodu3tsdc959.jpg "/>
3, the control machine installs the Luci, the group member according to Ricci:
[[email protected] ~]# ansible rhcs-m yum-a "Name=ricci state=present Disablerepo=epel"//group members install Ricci, packages that do not use epel source [[ Email protected] ~]# yum-y install Luci--disablerepo=epel//Controller installation Luci, software packages that do not use Epel source Note: Because the Epel source of the package is relatively new, prone to incompatibility problems, So do not use
4. Start the Ricci of the managed machine and the Luci of the control machine:
[[email protected] ~]# ansible rhcs-m service-a "Name=ricci state=started enabled=yes"//Start the Ricci service of the managed machine and set it to boot [email Protected] ~]# service Luci start//start the control machine Luci Services
Note :1, if the Luci can not start, please check whether the Epel source of the package is used ;
For the above reasons, the steps are as follows: 1, yum erase Jabberpy.noarch python-repoze-who-friendlyform.noarch python-tw-forms.noarch2, yum-y Remove Luci3, yum-y install Luci--disablerepo=epel4, service Luci start
2, if the management machine Ricci can not start, please ensure that the management machine iptables and networkmanage services are turned off;
5, if the above has been determined to complete, you need to first to the management machine Ricci User Configuration password, password set to ricci:650) this.width=650; "title=" Image 05031739.jpg "alt=" Wkiol1nkumeivzr3aajpmd4_29c874.jpg "src=" Http://s3.51cto.com/wyfs02/M01/25/91/wKioL1NkumeiVZr3AAJPMD4_29c874.jpg "/>
6, Next we can log on to the Web configuration, the address is https://control_hostname:8084650) this.width=650; "title=" Image 05031744.jpg "alt=" Wkiom1nku2yipyanaahrk0gvrhs576.jpg "src=" http://s3.51cto.com/wyfs02/M01/25/91/ Wkiom1nku2yipyanaahrk0gvrhs576.jpg "/>
will appear danger prompt, click still continue to 650) this.width=650; "title=" Image 05031747.jpg "alt=" wkiol1nku97dujxmaabqep5yqm4287.jpg "src="/http S3.51cto.com/wyfs02/m01/25/91/wkiol1nku97dujxmaabqep5yqm4287.jpg "/>
Here the user name and password default is the root and root password of the control machine 650) this.width=650; "title=" Image 05031748 (2). jpg "alt=" wkiom1nkvg-axdmfaafzjrn_ Geu896.jpg "src=" Http://s3.51cto.com/wyfs02/M01/25/91/wKiom1NkvG-AXdMfAAFZjrn_geU896.jpg "/>
There will still be warnings, pass him, click OK to continue, then you can create a cluster in manage clusters by creating: 650) this.width=650; "title=" Image 05031751.jpg "alt=" Wkiol1nkvtcijalhaafqb-exoto689.jpg "src=" Http://s3.51cto.com/wyfs02/M00/25/91/wKioL1NkvTCijAlhAAFQb-exoto689.jpg "/>
In which the cluster name, cluster node and other related information are defined! Configuration completed, waiting to restart the 650) this.width=650; "title=" Image 05031757.jpg "alt=" wkiol1nkvlnqzpdcaadbowlhzua097.jpg "src="/http S3.51cto.com/wyfs02/m01/25/91/wkiol1nkvlnqzpdcaadbowlhzua097.jpg "/>
Cluster has been configured to complete the basic, the rest is to add resources!
Third, configure resources, enable resources
We deploy a rudimentary Web service on this cluster.
1. Add Resources: VIP:172.16.26.99/16;WEB_SERVICE:HTTPD
650) this.width=650; "title=" IP res "style=" Float:none; "alt=" wkiol1nkw8bhalijaaehif6gxba635.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/25/91/wkiol1nkw8bhalijaaehif6gxba635.jpg "/>
650) this.width=650, "title=" httpd res "style=" Float:none; "alt=" wkiom1nkw_qzqfgfaadxoirztls585.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/25/91/wkiom1nkw_qzqfgfaadxoirztls585.jpg "/>
2, add the defined resources to the Service group, and try to start 650) this.width=650; "title=" Image 05031824.jpg "alt=" wkiom1nkxk3sjsdtaac2ib2luzm602.jpg "src=" Http://s3.51cto.com/wyfs02/M01/25/91/wKiom1NkxK3SjsDTAAC2IB2LUzM602.jpg "/>
Obviously, the service has started! Three servers above the same Web resources, you can achieve high availability of services!
Confined to space, this article no longer provides testing procedures! Please correct us.