Part 1: Description
This article illustrates how to implement WebSphere4.0 multi-node installation and "clone" configuration on the Win2000 platform (the idea on UNIX is the same, the specific details may be different). This installation and configuration have a wide range of applications in the actual production environment. Through this experiment, we can have a deeper understanding of the relationship between WebSphere, Web Server, and database servers and "clone".
Multi-node installation
The easiest installation of WebSphere is to install the web server, the application server, the database server on the same machine, and this installation is the simplest. However, in the actual production environment, this installation is not much seen for performance and security.
WebSphere's design makes it possible to flexibly install different components (web servers, application servers, database servers) on different machines. Depending on the needs of our customers, you can choose different installation topologies.
Implementing the best performance and the safest installation should be the management database and application server separation, with multiple application servers to share risks and performance. The following figure is a common example:
It should be noted that the web server needs to install the application server plugin, forward the request by plugin-cfg.xml, in WebSphere 4.0, the web server is connected to the application server via the HTTP (HTTPS) protocol. The application server is connected to the database via the DB2 client.
About clone
WebSphere can manage workloads through "clone". For large applications, it may not be able to satisfy the need if a very high-grade server can be satisfied, or it is possible to run only one application (JVM) in a machine. The above problem can be solved by "clone" for the application.
Each app can be seen as a Java virtual machine, each additional clone can be seen as an increase of Java virtual machines. Clones can be divided into vertical clones and level clones.
Vertical clones refer to a copy of multiple applications on a physical machine, which can better utilize the resources of the machine, and the effect is more effective in the case of the machine's performance.
Horizontal clone refers to a copy of multiple applications on multiple applications in multiple applications. This clone can share the load, and some machine failures will not affect the overall application.
Through these clones, WebSphere can run a variety of large, even super large applications.
Part II: System Topology
The figure below shows the topology of this example, and the software distributed on 4 machines is shown in the figure. WAS and DB2 are connected via DB2Client, and IBM HTTP Server is connected to WAS through WAS Plugin.
First, install the appropriate software on each machine so that they can process the request.
After completing basic installation configuration, we will make vertical and horizontal extensions for a specific application (application server). Distributed as shown below.
Part III: Specific installation steps
First, install the DB2 database server (Machine4)
Install the DB2 database server as a management database. WebSphere needs to store management information into the relational database, in this case, we use the DB2 database, and the management information of multiple application servers is placed in the same database.
Work before installation
First, establish a local user DB2Admin (suggestions), belong to the Administrators group.
Second, use the local security policy tool to grant DB2Admin:
Act As Part of the Operating System
LOG ON AS A Service
Create a token Object
Increase Quotasreplace a Process Level Token
Third, use the netstat -an command to check if the following ports are occupied, if used, prove that the previous version DB2 is not removed correctly.
- 523 (DB2 Administration Server)
- 50000 (DB2 Instance Connection Port)
- 50001 (DB2 Instance Interrupt Port)
- 50002 (DB2 Control Server)
Install DB2 server
First, log in with DB2Admin.
Second, start the DB2 installer.
Third, choose to install DB2 Enterprise Edition.
Fourth, choose a typical installation.
V. Select the installation directory.
6. Enter the database administrator user and password, which is consistent with the local user.
7. Start the installation file, the system prompts if the OLAP Starter Kit is installed, selecting the installation.
Eight, complete the installation, restart the machine, log in (DB2Admin) in the database administrator.
Verify DB2 server installation
First, run db2cmd.
Second, enter the db2level command to display the current database version.
Third, confirm that the installation database server is not lower than the following versions: "DB2 V7.1.0.43".
Fourth, editing the system Services file (in the C: / WinNT / System32 / Drivers / etc / Directory), check if there is two lines:
DB2CDB2 50000 / TCP #Connection Port for DB2 Instance DB2
DB2IDB2 50001 / TCP #Interrupt Port for DB2 Instance DB2
V. Operate DB2CMD.
6. Enter the DB2 GET DBM CFG | More command, display the system DB2 parameter, confirm that there is a display
TCP / IP Service Name (SVCENAME) = DB2CDB2
Configure DB2 servers
First, in order to save system memory, you can change the way the following service is manually manually:
DB2 SECURITY SERVER
Warehouse logger
Warehouse Server
Second, stop "DB2 JDBC Applet Server", you can use the command NET STOP "DB2 JDBC Applet Server".
Third, the line command:
Fourth, launch "DB2 JDBC Applet Server", you can use the command NET Start "DB2 JDBC Applet Server".
5. Check the
6. Run DB2CMD.
7. Run DB2SET DB2COMM and display the current connection.
8. Run db2set db2comm = tcpip, update.
Create a WAS management database
First, run db2cmd.
Second, run the following command, establish a database and change the Heap size.
DB2 CREATE DB WAS1
DB2 UPDATE DB CFG for Was1 Using ApplHeapsz 256
Third, run the following command, verify the database is established correctly.
DB2 List DB Directory
The display is as follows:
Database 1 Entry:
Database alias = WAS1
Database name = WAS1
Database drive = d: / db2
Database Release Level = 9.00
Comment =
Directory entry type = indirect
Catalog node number = 0
Fourth, run the following command, Catalog database.
DB2 catalog tcpip node
DB2 Catalog DB WAS1 AS WAS AT Node
(Catling WAS1, so that we can use the TCP / IP protocol to access database access)
V. Run the following command, verify that Catalog has been established correctly.
DB2 List DB Directory
The display is as follows:
Database 2 Entry:
Database alias = WAS
Database name = WAS1
Node name =
Database Release Level = 9.00
Comment =
Directory entry type = transote
Catalog Node Number = -1
6. Use the database administrator user and password to verify the correct connection of the database.
DB2 Connect to Was User
DB2 Disconnect Current
Seven, close the DB2CMD window.
Eight, establish a local user as an access user (WAS).
Nine, run db2cmd.
X. Run the following command to give access to the user (WAS) access.
DB2 Connect to Was User
DB2 Grant Connect, CreateTab on Database to User
DB2 Disconnect WAS
11. Verify access users can access normally:
DB2 Connect To Was User
12. Disconnect:
DB2 Disconnect Current
Twice, close the DB2CMD window.
Second, install DB2 Client (Machine 2, 3)
This step is performed on Machine 2, 3, respectively. Make Machine 2, 3 can be prepared for installing WAS through the DB2 Client connection database.
Work before installation
First, establish a local user DB2Admin (suggestions), belong to the Administrators group.
Second, use the local security policy tool to grant DB2Admin:
Act As Part of the Operating System
LOG ON AS A Service
Create a token Object
INCREASE quotas
Replace a Process Level token
Third, use the netstat -an command to check if the following ports are occupied, if used, prove that the previous version DB2 is not removed correctly. - 50000 (DB2 Instance Connection Port)
Install DB2 Client
First, DB2Admin landing.
Second, start the DB2 installer.
Third, choose to install Administration Client.
Fourth, select Typical to make a typical installation.
V. Select the installation directory.
Sixth, deselect Configure NetBIOS for Connection to DB2 Server.
7. Enter the database administrator user and password, which is consistent with the local user.
Eight, start the installation file.
Nine, the installation is complete.
Verify DB2 Client Installation
First, run db2cmd.
Second, enter the db2level command to display the current database version.
Third, confirm that the installation database server is not lower than the following versions: "DB2 V7.1.0.43".
Configuring DB2 Client
First, save system memory, can change the way the following service is started to manually:
DB2 SECURITY SERVER
Warehouse logger
Warehouse Server
Second, stop "DB2 JDBC Applet Server", you can use the command NET STOP "DB2 JDBC Applet Server".
Third, the command:
Fourth, launch "DB2 JDBC Applet Server", you can use the command NET Start "DB2 JDBC Applet Server".
5. Check the
Establish a remote database access
First, edit the system Services file and add the following line.
DB2CDB2 50000 / TCP #Connection Port of Remote DB2 Instance DB2
Second, run the db2cmd command.
Third, run the following command, Catalog Manage Database
DB2 Catalog Tcpip Node
DB2 Catalog DB WAS1 AS WAS AT Node
(Catalog DB-WAS on Machine4) - Machine2, Machine33).
Fourth, run the following command, verify the correct connection to the management database
DB2 Connect to Was User
DB2 Connect To Was User
DB2 Disconnect WAS
V. Close DB2CMD window
Third, install the WAS 4.0 server (Machine 2, 3)
This step is performed on Machine 2, 3, respectively. It should be noted that the default IBM HTTP Server is not installed, the WAS version of the two machines must be consistent, otherwise Clone cannot be performed.
Work before installation
First, establish a local user Wasadmin (suggest) belongs to the Administrators group.
Second, use the local security policy tool to grant WasAdmin:
-Act As Part of the Operating System-log on AS A Service
Third, use the netstat -an command to ensure that the following ports are not occupied.
- 900 (Bootstrap Port)
- 9000 (Location Service Daemon)
- 9080 (Default Application Server) - DEFAULT APPLICATION SERVER
Install WAS
First, make sure you log in as system administrator
Second, run the IBM WebSphere Application Server V4.0, Advanced Edition installer
Third, select language
Fourth, choose a Custom Installation mode installation
V. Select all components, except IBM HTTP Server.
Six, choose a plugin
7. Enter the WAS admin user and password
Eight, choose the installation directory
Nine, enter the management database information as shown (default)
Ten, accept other default selection, complete copy files
11. Select I Will Restart My Computer Later. After the installation is over, you don't immediately restart your machine.
Twelve, put the document
/bin/createwasdb.scr is named
Thirteen, check the
14, restart the machine, log in with the administrator.
Verify that WAS installation
First, check the
Second, confirm that there is an IBM WS Admin Server 4.0Windows service
Third, check the
Fourth, start the WAS4.0 server, you can use the following command or other way
5. Start the management console:
6. Start the default application server
7. Check the default application server correctly
After completing the above steps on Machine 2, 3, you should see two nodes because they use a management database.
Eight, verification:
Open IE, enter the following URL: http: // localhost: 9080 / servlet / snoop, display
Since the simplified HTTP Server in WebSphere 4.0 (in order to communicate directly with the Webserver). So, you can interact directly with WebSphere4.0 without installing WebServer (in the test environment)
Fourth, install IBM HTTP Server (Machine1)
Work before installation
First, establish a local user Wasadmin (suggest) belongs to the Administrators group.
Second, use the local security policy tool to grant WasAdmin:
-Act as part of the operation system
-Log on as a service
Third, use the netstat -an command to ensure that the following ports are not occupied.
- 80 (Standard HTTP Port)
- 443 (Standard Https Port)
IBM HTTP Server Administration Port
Install HTTP Server
First, keep the system administrator login
Second, run the IBM HTTP Server installer three, select language
Fourth, accept the agreement
V. Choose the installation directory
6. Select Typical installation method
Seven, enter administrator information (default)
8. Accept other default selection to complete the installation.
Nine, restart the machine, log in with the administrator role
Configuring HTTP Server
If you don't need to add additional administrators, you can omit this step.
Verify HTTP Server installation
First, start IBM HTTP Server
D: /> Net Start "IBM HTTP Server"
D: /> NET Start "IBM HTTP ADMINISTRATION"
Second, enter the HTTP request, verify that IBM HTTP Server starts normally
5. Install the WAS 4.0 plugin (Machine1)
Install the WAS 4.0 plugin on Machine1, enabling HTTP Server to connect to WAS 4.0 through the WAS 4.0 plugin.
Work before installation
First, stop HTTP Server: Net Stop "IBM HTTP Server"
Install WAS 4.0 plugin
First, confirm that login as local administrator
Second, line IBM WebSphere Application Server V4.0, Advanced Edition installer
Third, select language
Fourth, choose a Custom Installation mode installation
5. I only choose the web server plug-in component
6. Select IBM HTTP Server options
Seven, enter administrator ID and password (Wasadmin)
Eight, choose the installation directory
Nine, accept other default selection, complete the installation
Ten, restart the machine, log in as an administrator
6. Comprehensive configuration, verification installation
In Machine 2 or 3, add the virtual hostname on the WAS4.0 management console, generate the plug-in configuration file, copy the plug-in configuration file to the directory of the PLUG_IN on the HTTP Server, and restart HTTP Server.
Add a virtual host
First, if the WAS4.0 server is not started, start it. You can use the following command or other way
Second, the start management console:
Third, on the management console, increase the virtual host name of Machine1, Machine2, Machine3. Perform as follows:
The list of virtual hosts after completion is approximately as follows:
Fourth, confirm the changes, restart the related application servers of the two nodes.
Generate, copy plug-in configuration file
First, select two nodes, right click, "Regenerate the Web Server Plug-in Settings", regenerate
Second, copy the
Third, restart HTTP Server. You can use Net Start "IBM HTTP Server".
V. Start http request: http:// machine1 / servlet / snoop, check the response page. 7. Configure multiple nodes "clone"
Deploy the application server using the sampleApp.ear file. According to this application server, the server group is generated, then "clone", vertical and horizontal distribution to Machine 2 and Machine3.
Delete the default application server
First, start the management console: adminClient.bat
Second, stop all application servers
Third, delete the enterprise application on Machine2, Machine3, Sample Application
Fourth, delete the application server on Machine2, Machine3
Add application server
First, use the wizard, establish the application server app1 on Machin2 or Machine3
Second, use the menu: Console -> Wizard -> Install Enterprise Application. Install the application on the application server app1.
Third, in the Installation Enterprise Application Wizard, select the EAR file SampleApp.ear, accept other default options, complete the installation.
Generate server group
First, select the application server app1 that has been created, right-click "Create Server Group ...", the wizard
Second, in the wizard, enter the server group name servergroup1, accept other default options, and establish a server group.
Generate "clone"
First, the management console, select ServerGroup1, right-click "New ..." -> "Clone ...", the wizard.
Second, select the node that needs to be deployed in the wizard, enter the name of "clone", accept other default options, complete "clone". In this example, the application server App1 is deployed in Machine2, Clone1 deploying in Machine2, Clone2 deployment in Machine3, Clone3 deployment in Machine3. Vertical extensions are implemented on a single node, and horizontal extensions are achieved on different nodes.
Install application file
First, on the machine (Machine3) that is "clone" and does not physical deployment document, copying the deployed file directory on the "WAS_HOME> / InstalledApps / under" Directory), copied to Machine3.
Start server group
First, select ServerGroup1 in the Management Console, select "Advanced" page, select "Loop" in Workload Management Selection Policy, set the access mechanism. The access is an average distributed to four application servers in this example.
Second, in the management console selection server group servergroup1, right click to select "Start", and the four application servers are started.
Regeneration plugin configuration file
First, select two nodes separately in the management console, right-click "Regenerate The Web Server Plug-in Settings", regenerate
Second, copy the
Third, restart HTTP Server. You can use Net Start "IBM HTTP Server".
Fourth, initiate an HTTP request: http: // machine1 / servlet / snoop, check the response page.
Part IV: Precautions
So far, the entire environment is established, and below is something that needs attention:
First, the application server needs to ensure that the version is consistent, otherwise "clone" cannot be performed. Second, pay attention to the update of the plugin file.
Third, in the "clone" process, you need to copy the deployed application file to the installed machine.
About author
Wu Xiaochao, long-term development and implementation of JAVA and middleware products. It is now deputy manager of the Guangzhou Tianda Digital Technology Department, and worked in the Technical Security of the Industrial and Commercial Bank of China. Graduated from the Department of Engineering Physics, Tsinghua University, Bachelor of Engineering. Contact Email: 247@163.net