This scenario is suitable for a small business that does not have enough transactions a day to justify separate machines for the database and the application server. Also such a business does not have enough hits on its Web site to justify putting the Web server on another machine.
Therefore, all products are installed locally, including IBM HTTP Server, WebSphere Application Server, and DB2. WebSphere Payment Manager is an application server inside WebSphere Application Server and as such it has to be on the same machine.
Preinstallation checking
The most important step to assure a quick installation is have all the software and data ready to use. For our install we had at hand all the required software in a temporary fileset in our AIX machine.
Since this installation is for testing purposes we decided to use a small number of large filesets instead of creating one fileset for each product. Logical Volume Manager was used to provide some level of separation from physical disk sub-systems. For each database instance created, we created a logical volume. This may not be suitable for a production environment, but no matter how you partition a machine the installation steps remain the same.
Again because this was a test environment we did not create many users on our AIX system, but only created one user to act as the DB2 administrator. All other operations were done by the root user.
Operating system
We started with a clean 4.3.3 AIX machine. The minimum maintenance level tested to run WebSphere Application Server was level 2, but we upgraded our AIX to the highest version available. That was maintenance level 8.
Verify your paging space with lsps -a. At least 128 MB of paging space is needed, but the recommendation for AIX is twice the size of the system RAM. Prior to installation we suggest you back up your system using the mksysb
command.
DB2
We installed DB2 UDB Enterprise Edition 7.1. You need to apply at least Fix Pack 1 to get WebSphere Application Server, Advanced Edition 3.5.x up and running properly. We downloaded UDB Fix Pack 3 to a temporary directory and decompressed it for later use.
Before starting the actual installation, we created a DB2 user and group, created a new volume for the DB2 instance, and allocated disk space.
The main steps are:
1. Create a new file system for the DB2 instance, where all databases will be kept. We called this /home/db2inst1.
2. Allocate file system storage space to journaled file systems, including the one just created, as shown in Table 3-1. As the WebSphere Application Server
and WebSphere Payment Manager databases grow, the size of the /home/db2inst1 file system may need to be increased.
Table 3-1 Free space needed in journaled file systems.
3. Create a user db2inst1 (the same name as the instance for ease of use) in a new group db2admin.
4. Give the ownership of the file system where the DB2 instance will reside (/home/db2inst1) to this new user (db2inst1). Use the command chown -fR db2inst1:db2iadm1 /home/db2inst1. Then verify the file system ownership (user db2inst1, group db2iadm1) with ls -la /home/db2inst1.
The AIX machine is now ready for the installation of DB2 UDB Enterprise Edition 7.1 software.
WebSphere Application Server
WebSphere Application Server, Advanced Edition V3.5 base is included with the WebSphere Payment Manager product, so we downloaded Fix Pack 4 for WebSphere Application Server. With the AIX maintenance level and the DB2 Fix Pack level we used, at least Fix Pack 3 for WebSphere Application Server was required, but we installed Fix Pack 4.
WebSphere Payment Manager
We installed the WebSphere Payment Manager framework and tested it with the included OfflineCard cassette. The installation of other cassettes is very
straightforward once all the data required by the specific cassette is obtained, and is discussed in later chapters of our redbook.
Installation steps
The following steps should used to complete the install:
File system Blocks of free space needed in scenario 1
/ 100,000
/home 100,000
/home/db2inst1 600,000
/usr 1,000,000
Note: Don’t use more than 8 characters for the name of the owner of the DB2
instance. DB2 recommends no more than 8 characters to keep compatibility with host S/390 environments.
2. Install DB2.
3. Apply the Fix Pack to DB2.
4. Create a database for WebSphere Application Server.
5. Install WebSphere Application Server. If you can get Version 3.5.2 of WebSphere Application Server, use it. It solves some problems with prerequisites checks. This will also install IBM HTTP Server (IHS).
6. Apply the patch to WebSphere Application Server. This will also patch IHS. 7. Create a database for Payment Manager.
8. Install Payment Manager.
9. Apply the patch to Payment Manager.
Although Payment Manager includes a silent installation of WebSphere Application Server for a clean machine (avoiding step 4) we did not use this installation approach. This install imposes several restrictions on the database and directory names, and provides you with few configuration options. If this approach does meet your requirements, ensure that the following steps are taken before running the install:
1. Check that the following AIX packages are installed: a. bos.adt.include
b. bos.adt.lib c. bos.rte d. X11.adt.lib e. X11.adt.motif
2. Install the latest maintenance level for AIX.
Operating system
The only step necessary here is the installation of the correct maintenance level. Check for the required space in the / (root), /tmp, /usr and /var file systems by making a preview of the maintenance level update using smitty update_all. The space requirements are included in the summary at the end of the SMIT output. You can choose whether to commit the software updates. The advantage of committing is more free space on the file systems. The disadvantage is that you cannot roll back the changes.
You can check out if the fixes has been installed with the command: instfix -ikv 4330-08_AIX_ML
This will report that not all filesets have been found, but this is not a problem, because not all packages to fix are installed on the machine. However, if no fixes have been installed the report will say that no data was found about the fixes, and this is a problem that you will need to correct.
If everything is OK, you can proceed with the installation.
Change the file systems size if needed and repeat the smitty update_all
command with the same options as in the preview, but this time applying the changes.
Reboot the machine with the shutdown -Fr command after the update has successfully completed.
After this, your AIX machine will be at the latest maintenance level.
DB2
Execute the db2setup command from the DB2 install directory to start the DB2 install. Follow these steps:
1. When the Install DB2 V7.1 window appears, select DB2 UDB Enterprise
Edition, highlight OK, and press Enter.
2. When the Create DB2 Services window appears, select Create a DB2
Instance, highlight OK and press Enter.
3. In the DB2 instance authentication window, enter the following: – User Name: db2inst1
– Group Name: db2admin
– Home Directory: /home/db2inst1 – Highlight OK and press Enter.
4. You can ignore the message about DB2 not being able to change an existing password and continue.
5. Enter the following DB2FENC values: – User Name: db2fenc1
– Group Name: db2admin
Note: The password field is intentionally left blank. In this example, we
have manually created the user db2inst1 and set the password. DB2 cannot change an existing user’s password. If a password is entered, it will be ignored.
– Home Directory: /home/db2fenc1 – Password: <your_password> – Verify password: <your_password> – Highlight OK, and press Enter.
6. In the Create DB2 Services window, highlight OK and press Enter.
7. Once the Summary Report window appears, listing the product components to be installed, highlight Continue and press Enter.
8. The db2setup program installs the selected components. Depending on the speed of your processor, this can take up to 15 minutes. When the install completes, a notice window informs you whether it was successful. 9. Scan the Status Report to ensure that all components were installed
successfully. The log of all installation process is saved on /tmp/db2setup.log. Modify the .profile file of the DB2 instance owner so that the db2profile is set up automatically every time the user logs on. Create a new or edit the existing .profile for the DB2 instance owner and add this line:
$HOME/sqllib/.db2profile
Switch to the DB2 instance owner ID ( su - db2inst1) and ensure that you can start ( b2start) and stop DB2 (db2stop). Also test that you can access the DB2 command line by typing db2.
Before applying the DB2 Fix Pack, all DB2 service must be stopped. The commands to do this are:
su - db2inst1
db2 force applications all db2 terminate
db2stop db2licd end exit
To install the .bff files that comprise the DB2 Fix Pack, with all the prerequisites in apply state, use the command smit update_all and make sure to select the options COMMIT software updates = NO and SAVE replaced files = YES. Before actually applying the fixes, do a preview. If everything is OK, proceed with the real update. You can later commit or reject the Fix Pack using SMIT again. This Fix Pack has an additional subdirectory in the installation image. The name of this subdirectory is “extras”. This extras subdirectory contains the filesets for the double-byte and unicode conversion tables, specifically the following filesets:
db2_07_01.conv.kr db2_07_01.conv.sch db2_07_01.conv.tch
To install the filesets in the extras subdirectory, use the command smit install_all.
Since future Fix Packs will require this Fix Pack to be already installed, they will no longer include the extras subdirectory. This means that you must have these filesets installed before installing future Fix Packs.
After applying fixes, you must enter the following at a command prompt: db2 terminate
db2 CONNECT TO dwcntrl
db2 BIND $HOME/sqllib/bin/@db2ubind.lst BLOCKING ALL GRANT PUBLIC db2 BIND $HOME/sqllib/bin/@db2cli.lst BLOCKING ALL GRANT PUBLIC db2 terminate
IHS, WebSphere and Payment Manager
Before starting the install program of WebSphere Payment Manager we need to create the databases for WebSphere Application Server and for WebSphere Payment Manager, and to create some alias for the installation to work. To create the database for WebSphere Application Server issue these commands as the user db2inst1 (the owner of DB2).
db2 create db was
db2 update db cfg for was using applheapsz 256
If you install UDB and WebSphere Application Server Version 3.5 on the same machine, you must enter these commands (substituting the names appropriate for your system) from a DB2 prompt to circumvent a known problem in
WebSphere Application Server:
catalog tcpip node node_name remote hostname server svcename catalog database db_name as db_alias at node nodename Then edit the /etc/environment file and add the following line:
EXTSHM=ON
As DB2 Database Administrator (db2inst1), edit the .db2profile file in /home/db2admin/sqllib/ and add the following lines:
Note: Installing the extras subdirectory will automatically commit the above
filesets. You will not be able to reject the Fix Pack if you install the extras subdirectory.
DB2COMM=tcpip export DB2COMM Start or restart DB2.
If you want the setup program to install WebSphere Application Server, Advanced Edition V3.5, you must use the alias of wasalias for db_alias when cataloging the WebSphere Application Server database.
Then, create a database for the Payment Manager by entering: db2 create db payman
You may want to have the Payment Manager database in a different DB2 instance from the WebSphere Application Server database. If this is the case you need to create a new DB2 instance (for example psadmin). If you do this you will also have to define service name ports in the /etc/services file:
db2cpsadmin 50000/tcp
(e.g., db2c + instance name; port = 50000) and db2ipsadmin 50001/tcp
(e.g., db2i + instance name; port = 50001)
Install procedure on AIX:
1. Log on as root (use su - root to load all environmental variables as root). 2. Mount the Payment Manager AIX CD-ROM.
3. Run the Install command found on the WebSphere Payment Manager CD. 4. In the Payment Manager Install window, click Next.
5. Accept the license agreement.
6. Accept the default destination directory or enter another directory. Do not
Note: Make sure your Internet connection is up and running before starting
the installation program. You have to have a fully qualified host name configured; otherwise, WebSphere Payment Manager will use a host name ending with a dot. If you are not sure, at the end of the installation check the httpd.conf file of the HTTP server; probably it will have the value for the directive ServerName with a dot at the end.
Also ensure that the resolution on your display is set to 800 by 600 pixels or higher to best view the Payment Manager installation program.
The database, the HTTP Server, and WebSphere Application Server must be running during the installation.
7. Select the UDB database to use with Payment Manager.
8. If the install finds the JDBC driver information, click Next. If the install program does not automatically find the JDBC driver information you should enter the correct values. For example:
– JDBC Driver Class name: com.ibm.db2.jdbc.appDB2Driver – JDBC Class location: /usr/lpp/db2_07_01/java12/db2java.zip/ – JDBC Driver shared library path: /usr/lpp/db2_07_01/lib/
Note: If you entered incorrect database information and database errors
occur, using the Back button may cause more database error pop-ups to appear. If this occurs, you can either click Cancel and restart the installation or you can click Back through several windows and then move forward using the Next buttons (ensuring the correct values are entered at each intervening window) until you get back to the database entry window. Once this window reappears, you can enter the correct information.
9. In the Payment Manager Database Access Information window, enter your values for the database owner user ID, administrator’s user ID, administrator‘s password, Payment Manager database name and the DB2 instance name. For example, if you are using UDB, enter:
db2admin /*for the database owner user ID
db2admin /*for the database administrator's user ID db2admin /*for the database administrator's password payman /*for the IBM Payment Manager database name. DB2 /*The default DB2 instance name
10.In the Payment Manager Configuration Information window, take the default of 8611 for the Payment API port number or enter a new value if another application on your system uses this TCP port.
11.In the Installation Summary window, review the chosen parameters. Click
Next to continue the installation.
Note: The progress bar will move during installation, although at times it may
appear to have stopped. Do not terminate the install, which is continuing. The progress bar will resume moving when system resources permit.
Applying a Fix Pack to WebSphere Application Server
The WebSphere Application Server Fix Pack 4 also patches the IBM HTTP Server, so you must stop both IBM HTTP Server and WebSphere Application Server before applying the Fix Pack.
Install the Fix Pack by following the instructions of the readme, taking care to define the correct classpath.
Stop, check and start services script
A basic task needed after the installation is the automation of the starting, stopping and checking of the services, be it all in one block or one by one. For AIX we have build a script that does all three things and that even checks if the application server for the Payment Manager servlets inside WebSphere Application Server is up and running. The script is run as root and also makes use of the DB2 user (in our example, db2inst1).
Three files are needed. One is the shell script that controls the starting, checking and stopping of processes as shown in Example 3-1 on page 51.This should be edited to use the actual directories where all the products are installed. The other two shown in Example 3-2 and Example 3-3 on page 53 are TCL script files used for WebSphere Application Server to stop and start the Payment Manager application server. These two also need to be edited to use the node name of your WebSphere Application Server. These two scripts must be placed in the bin directory of WebSphere Application Server.
If you choose to start all the Payment Manager services manually, points to note include:
The Payment Manager environment for IHS must be loaded before starting IHS. If it is not loaded, the servlets won’t be able to connect to the database. This is done with the command
. <WPM_directory>/SetupWebServerEnvironment
Make sure to run this command with the same user that starts the IHS. The database must be running before starting Payment Manager or
WebSphere Application Server.
Use nohup to start the Payment Engine: nohup <WPM_directory>/IBMPayServer
The order in which we recommend you start all the services is as follows: 1. Make sure IHS is stopped.
2. Start DB2.
3. Start Payment Manager.
4. Start WebSphere Application Server and the Payment Manager application server.
5. Load the Payment Manager environment for the HTTP server. 6. Start IHS.
Example 3-1 Code for rc.wpm. Before using it, be sure to edit the directories and user names
#!/bin/sh #
# Start, Stop and Check Payment Manager related services case $1 in
start) CURDIR=$PWD echo
cd /usr/HTTPServer/bin
./apachectl stop > /dev/null 2>&1 echo "Starting DB2 instance"
su - db2inst1 -c "db2start" > /dev/null 2>&1 echo "Starting Payment Manager"
cd /usr/lpp/PaymentManager nohup ./IBMPayServer &
echo "Starting WebSphere Application Server" cd /usr/WebSphere/AppServer/bin
./startupServer.sh & sleep 120
echo "Starting Payment Manager Application Server" ./wscp.sh -f ./startWAS.tcl
echo "Starting Apache Web Server" cd /usr/lpp/PaymentManager
. ./SetupWebServerEnvironment
/usr/HTTPServer/bin/apachectl start > /dev/null 2>&1
cd $CURDIR echo
echo "Servers Started" echo
;; stop)
CURDIR=$PWD echo
echo "Stoping Apache Web Server" cd /usr/HTTPServer/bin
./apachectl stop > /dev/null 2>&1
cd /usr/WebSphere/AppServer/bin ./wscp.sh -f ./stopWAS.tcl echo "Stoping Payment Manager" cd /usr/lpp/PaymentManager ./StopIBMPayServer
cd $CURDIR echo
echo "Servers stoped" echo
;; check)
PROC=$(ps -ef | grep java | grep framework.ETill | awk '{print $2}') if [ -n "$PROC" ]; then
echo "OK: Payment Manager Active" else
echo "ERROR: Payment Manager Stoped" fi
PROC=$(ps -ef | grep java | grep AdminServer | awk '{print $2}') if [ -n "$PROC" ]; then
echo "OK: WebSphere Application Server Active" else
echo "ERROR: WebSphere Application Server Stoped" fi
PROC=$(ps -ef | grep httpd | grep HTTPServer | awk '{print $2}') if [ -n "$PROC" ]; then
echo "OK: Apache Web Server Active" else
echo "ERROR: Apache Web Server Stoped" fi
;; *)
echo " Usage: /etc/rc.wpm [ start | stop | check ]" esac
exit
Example 3-2 shows a TCL script that can be used to start the WebSphere Payment Manager application server.
Example 3-2 Code for startWAS.tcl
ApplicationServer start {/Node:<your_node_name>/ApplicationServer:WebSphere Payment Manager/}
Example 3-3 shows a TCL script that can be used to stop the WebSphere Payment Manager application server.
Example 3-3 Code for stopWAS.tcl
ApplicationServer stop {/Node:<your_node_name>/ApplicationServer:WebSphere