10.4.4 Install Trade 6.1 using the installation script

To prepare your J2EE environment to run Trade 6.1, create several resources (such as JDBC and JMS resources). For example, on each application server node there must exist a JDBC data source that points to the database tradedb you just created. In our scenario, we only had one application server.

The configuration steps could be performed using the WebSphere Administrative Console, but that would take a while. Fortunately, however, Trade 6.1 comes with a .jacl script that can be used to configure and install Trade 6 in a clustered environment. However, this script file also requires significant manual interaction, such as entering the paths for DB2 client path and DB2 server name.

In our case, we optimized the script by coding a number of values as defaults so the script could be reused for installing other environments. Example 10-8 shows the changes we made to trade.jacl.

Example 10-8 Customization of trade.jacl

# Customized options for database classpaths

set DB2JccPath "/home/db2rcl1/sqllib/java/db2jcc.jar;/home/db2rcl1/sqllib/java/db2jcc_license_cu.jar"
set DB2NativePath "/opt/IBM/db2/V9.1/lib64"
set DB2CliPath "/home/db2rcl1/sqllib/java/db2java.zip"

# Default options for database user name
set DefaultUserDB2 "db2rcl1"

# Default options for database password
set DefaultPasswdDB2 "login1"

# DB2 database options
set DefaultDatabaseName "stradedb"
set DefaultDB2Hostname "brazos.itsc.austin.ibm.com"

# Silent install properties for Managed Node
# - Modify these properties to specify the target node and server
set TargetNodeName "PLNode"
set TargetServerName "Server1"

A copy of the entire trade.jacl installation script can be found in Trade 6.1 Installation script: trade.jacl in Appendix A, Sample files, with the customizations highlighted.

From the /exports/was_install/trade61/tradeinstall directory, install Trade 6.1 by issuing the following command:

<WAS_HOME>/bin/wsadmin.sh -f trade.jacl

This command performs the installation in a two-step process. The first step creates the necessary JDBC and JMS resources. The second step installs the application ear file.

Because we used a variable for the JDBC driver path, we now needed to set the value for this variable according to our DB2 client installation. In your case, go to...

Environment -> WebSphere Variables

...in the Administrative Console. Click DB2 UNIVERSAL_JDBC_DRIVER_PATH and enter the path to your SQLLIB/java directory, for example...

/home/db2rcl1/sqllib/java

If we are installing a single server configuration, restart the WAS instance by using the startManager.sh and startNode.sh commands.

Next