This document describes how to create a filebased-Repository cluster. For databased-Repository-based clusters, I will go into more details later. For large-scale enterprise applications, it is unrealistic to have no clusters. Considering the scalability and high availability, the middleware cluster technology will be applied in the general production environment.
This article mainly describes 10 gas-related cluster configuration and general management content.
10 gas clusters are divided into two categories
1. Management-based clusters:
The management-based cluster mainly records the configuration information of the entire cluster through Repository, such as the program released by the cluster.
In this way, the Administrator has few manual operations. For example, to publish a program, you only need to publish the whole cluster once.
2. manually managed clusters:
In this way, in addition to the most basic session replication and ejb cluster, 10gas does not provide more management means,
To publish a program, you need to publish all instances in the cluster. You can imagine that if you have more than 10 servers, if every time you release a program, you need to release one server, not only the workload is heavy, but also it is easy to make a mistake.
Therefore, we recommend that you use a management-based approach for cluster creation.
Management-based clusters mainly use the Repository to store related configuration information. Due to the importance of Repository, I would like to take a moment to talk about the Repository related information.
There are two storage methods for Repository: databased-Repository and filebased-Repository. Among them, filebased-Repository is a new function of 10gas. It mainly solves the problem that only databased-Repository cluster can be created in the past, while databased-Repository needs to install Infrastructure. This Infrastructure is a headache for everyone. It is not huge and prone to problems. Therefore, filebased-Repository is available.
The information stored in Repository mainly includes the following types:
1. Product metadata;
2. Manage metadata;
3. Idendity Management metadata (only available in databased-Repository ).
The main information required for a cluster is 1. Product metadata and 2. Management metadata.
J2EE andWeb Cache installation type. The default installation method is filebased-Repository. Of course, it can also be migrated to databased-Repository.
Cluster creation requirements
1. All application server instances must have the same farm, that is, they must use the same Repository to store management information.
2. All application server instances in the cluster must install the same OS.
3. Each application server instance in the cluster can only be composed of one ohs server.
4. Each application server instance can have multiple Solaris instances. You can have multiple enter processes.
5. Of course, all application server instances must be of the same version.
The two ip addresses of the involved application server instance are both 10.1.18.1. On the same physical server, two users install two application server instances, and each application server instance uses different ports. The operating system is redhat 3.0 update 2.
The user ias10g enables ohs, port 7778, and the user ias10g2 only enables the image search service .. The ias10g user serves as the filebased-Repository host.
1. test whether the application server instance already belongs to a specific farm.
Check instance 1:
su - ias10g [ias10g@finproduction home]$ dcmctl whichFarmStandalone instance |
It shows that this instance has not been added to farm. If the following command is displayed, run the following command to exit:
Farmdcmctl leaveFarm checks instance 2su-ias10g2 [ias10g2 @ finproduction ias10g2] $ dcmctl whichFarmStandalone instance [ias10g2 @ finproduction ias10g2] $ |
2. initialize Repository:
Su-ias10g get the current id number [ias10g @ finproduction home] $ dcmctl restart: 7101 [ias10g @ finproduction home] $ initialize farm dcmctl joinFarm-r finproduction.tplife.com: 7101 |
Finproduction.tplife.com: 7101 is the information obtained through getRepositoryid.
Now let's see if farm has been added:
[ias10g@finproduction home]$ dcmctl whichFarmFarm Name: .tpdata.ias10g.OraHome1.dcm.repositoryHost Instance: iastest.finproduction.tplife.comHost Name: finproduction.tplife.comRepository Type: Distributed File Based (host)SSL In Use: false |
We can see that the File Based farm has been added. The instance is host.
3. Add instance2:
su - ias10g2 dcmctl joinFarm -r finproduction.tplife.com:7101 |
Join successful. Check the current farm information.
[ias10g2@finproduction ias10g2]$ dcmctl whichFarmFarm Name: .tpdata.ias10g.OraHome1.dcm.repositoryHost Instance: iastest.finproduction.tplife.comHost Name: finproduction.tplife.comRepository Type: Distributed File BasedSSL In Use: false[ias10g2@finproduction ias10g2]$ |
We can see that file-based Repository has been added successfully.
4. Create a cluster: (two methods)
1. Create an EMR instance on the em management interface;
2. manually create the instance by using dcmctl.
Since it is relatively simple to create a cluster using em, and creating a cluster is of a relatively high level, I will focus on how to create a cluster manually: su-ias10g.
Check whether the cluster dcmctl listclusters has been created. No output. It indicates that no output has been created.
Create a cluster: [ias10g @ finproduction home] $ dcmctl createcluster-cl mycluster
1. mycluster:
-Cl: Specify the cluster name.
[Ias10g @ finproduction home] $ dcmctl listclusters1 mycluster
You can see that a cluster has been created.
First, add instance1 to the cluster:
[ias10g@finproduction home]$ dcmctl joincluster -cl mycluster 1 iastest.finproduction.tplife.com |
Add instance2 to the cluster:
su - ias10g2 [ias10g2@finproduction ias10g2]$ dcmctl joincluster -cl mycluster 1 iastest2.finproduction.tplife.com2 iastest.finproduction.tplife.com |
We can see that there are already two instances in the cluster mycluster.