First, preface
The previous article described the installation and application of WebSphere, which was generally used for development testing (which is also used in some small application production environments), and most of the WebSphere application Server Network Deployment used in production
Short for the wasnd, can do large-scale cluster. This article will explain the large-scale cluster operations of commercial-grade app Server, while consolidating IBM Http Server.
Second, the installation of wasnd
Unzip after downloading the installation package
See Repository.config know how to install it? This is the same as WebSphere installation, are installed through the IM, the steps are basically similar, here the description of the process is relatively brief, please note.
start IM, and then add the repository to the preferences, note: The last time you installed the WebSphere repository file, don't check it again.
Default Go
Start the profile tool to create the profile after installation is complete
III. pre-cluster Preparation 3.1 Management unit creation (DMGR)
Start the Profile management tool under WASND
Click Create
Select "Manage" after next
Select Advanced
Profile file name and so on are left by default and can be manually modified
It's also important to note the hostname configuration
Configure users and Passwords
Port information
Do not serve as a system. Continue by default go down to start the installation
After the installation is successful, look at the corresponding directory file
The command line enters the directory J:\IBM\WebSphereNetWorkDeployment\AppServer\profiles\Dmgr01\bin
Start Dmgr
Note that the service name is Dmgr.
From the path
J:\IBM\WebSphereNetWorkDeployment\AppServer\profiles\Dmgr01\config\cells\Liaokailin-PCCell01\nodes\ Liaokailin-pccellmanager01
In the Serverindex.xml in
The service name can be found. Enter after successful boot: http://localhost:9061/ibm/console (note port OH)
Note: Port information can be viewed through the Logs/aboutthisprofile.txt file under the profile
- MB Profile Name: Dmgr01 Set this profile as the default profile: True node Name: Liaokailin-PCCellManager01 unit name: Liaokailin- PCCELL01 Host Name: Liaokailin-906190449809 8879 to run administration as a service: False
View Code
The wasnd is more complex than the was console after login entry
3.2 Creation of cluster nodes
Create a Node 1 AppSrv01
Select "Application Server" (the following operation is similar to the installation of was)
See node is not created above, Dmgr created earlier is cell
Note Port information
Similarly, create a node AppSrv02
After the creation is complete, get:
At this point our two cluster nodes have all been created.
Iv. Cluster 4.1 node Union to unit
Above we created a unit dmgr and two nodes, at this time they have no association between them, the following command operation to unite them in a piece
Combine AppSrv01 into Dmgr
Enter the bin directory under the AppSrv01 corresponding profile directory: J:\IBM\WebSphereNetWorkDeployment\AppServer\profiles\AppSrv01\bin
Execute command: addnode.bat localhost 8879–username admin–password admin
Here 8879 is the SOAP connection port corresponding to the Dmgr
Soap is a simple Object access protocol that can be later elaborated in future Web Service articles.
In the same vein , combine AppSrv02 into dmgr.
Two cluster nodes have been successfully federated to Dmgr
Stop AppSrv01 stopnode-username admin-password admin
Stop AppSrv02 stopnode-username admin-password admin
Stop Dmgr Stopmanager
Then start the restart operation
start Dmgr, then start two nodes AppSrv01, AppSrv02 ( note operation using command )
Node is completed after Dmgr startup
APPSRV01
AppSrv02
4.2 Web console for cluster 4.2.1 building environment
Input Http://localhost:9061/ibm/console into the console
We knew what we were going to do before we saw it. The right thing is to create a cluster
Click "New" to enter the cluster name
Added cluster members, note the data of the circled red circle!
After entering the second node, select the node, and then click "Add Member" is not directly next
The above is the cluster node list
Save after clicking Finish
Start the cluster
in order for the cluster nodes to perform the following actions synchronously
Check "Synchronize changes with nodes"
View Application Server
Remove both of the selected.
4.2.2 Configuring a data source
The configuration data source is identical to the previous one, and here are just the key steps
Select a cluster
The provider completes the synchronization operation
After the data source creation is successful, the app can be published.
4.2.3 Deploying Apps
Install the App
This is the last war package you used, and then the next
After clicking Save , wasnd will sync the app to each point (the Tomcat cluster needs to be copied manually)
Look at the corresponding directory:
Input: http://localhost:9083/WebDemo/and http://localhost:9084/WebDemo/for access
Here it is necessary to explain the port problem, when the two nodes are created to find that the port should be 9081 and 9082, why change here?
Look at this picture first:
The services we configured when we created the nodes were Server1, but the Node01 and NODE02 were used when adding to the cluster members. This is what causes the port to change. How does it change?
The answer is: When added to the cluster, the member is unified Server1, that is, the member name is Server1, but each time the selected node is not the same.
Now that the cluster environment is set up, we need to consolidate IBM Http server to forward our requests. How to integrate it? Its operation process and WAS6, 7 difference is quite big, the following slowly way.
V. Integration with IBM HTTP Server 5.1 IBM HTTP Server Installation
IBM HTTP server is modified by Apache HTTP server, so many tuning modifications are similar
Unzip after downloading the installation package
Start the installation after the test connection is successful
Next
Note Modify the installation directory
The default listener port is 80, do not conflict oh
Set to system service, the startup type is selected as manual, otherwise the turn-on time becomes longer.
Then go by default, only to appear below the interface
After the installation is successful, the Start menu appears:
Starting the IBM Http Server command-line window flashes over to indicate a successful start. Input http://localhost/get
Indicates that the installation was successful.
5.2 Integrated Configuration Instructions
In the WAS8.5 consolidation configuration, the official recommendation is to use the Web Server plug-ins and WebSphere customization Toolbox to integrate the former to generate the consolidated plug-in, which defines the Web service. Personal use manual configuration
It's a little easier to install the above two software, and then discuss the installation and use of the two above. Manual configuration is used here.
As with Tomcat and Apache, a plugin is also required (Web Server plug-ins can be generated automatically), and the plug-in mod_was_ap22_http.dll copies it to the bin directory in the IBM HTTP Server installation directory
In control of creating a new Web server
Note Select the server type, the node can choose any one, will automatically synchronize to the cluster node
Here the path configuration to note, configure the installation location to Httpserver. Then next, start the service when the installation is complete
After the service is created, view the plugins directory under the IBM Httpserver installation directory with a plugin-cfg.xml file, where the URL mapping rules are configured under the Urigroup node
Then modify the httpd.conf file and append the following to the end of the file:
LoadModule was_ap22_module "J:\IBM\HTTPServer\bin\mod_was_ap22_http.dll" Webspherepluginconfig "J:\IBM\HTTPServer\Plugins\config\web\plugin-cfg.xml" <virtualhost *: the>ServerName Liaokailin-pcdocumentroot D:/deploymentdirectoryindex index.htm index.html index.jsp<directory"D:/deployment/webdemo">Options None allowoverride none Order allow,deny allow from All</Directory></VirtualHost>
The operation is very similar to the apache+tomcat.
Restart the Web server that was just named Web, enter Http://localhost/WebDemo access:
Click to get
Viewing log files under two nodes
Discovery Node 2 Prints log information to access the database, stopping node 2
Again to access the Webdemo, you can find that node 1 prints the log
The above indicates a successful cluster.
Note: Here is a brief description of how to use Web Server plug-ins and WebSphere customization Toolbox to consolidate WASND
1. Creation of two custom profiles (i.e. two nodes)
2. Combine two nodes to Dmgr
3. Installation of both Web Server plug-ins and WebSphere customization Toolbox (WCT) both through IM
4. Open WCT Configure Web server plug-in configuration where you need to specify the installation location for the Web server plug-ins, the httpd.conf file location for IBM Httpserver, the profile that you have chosen to create (optionally one)
5. Create a Web server in the integrated console, then build the plug-in and propagate the plug-in, which automatically generates the following in the httpd.conf file:
LoadModule was_ap22_module "J:\IBM\HTTPServer\bin\mod_was_ap22_http.dll"
Webspherepluginconfig "J:\IBM\HTTPServer\Plugins\config\web\plugin-cfg.xml"
6, publish the application.
The end of the article!
Sixth, WebSphere8.5 (commercial server) large-scale cluster