
=================================
WPC 5.0.1-IF010#01  Installation
=================================

# Copyright (c) 2000, 2004 IBM Corp. - All Rights Reserved.
# IBM makes no representations or warranties about the suitability of
# this program, either express or implied, including but not limited to
# the implied warranties of merchantability, fitness for a particular
# purpose, or non-infringement. 


The following sections are covered in this file:

1) Installation Requirements
2) WPC Installation



INSTALLATION REQUIREMENTS
=================================

Before you install the IBM WebSphere Product Center (WPC) software, ensure 
that you have all the necessary prerequisites outlined in this chapter. The 
sections in this chapter provide a brief overview of the system hardware and 
software requirements, team requirements, and the DB2 configuration required 
to run WebSphere Product Center.

For the best performance, it is recommended to run WebSphere Product Center 
on a dedicated system. The system should have restricted access to maintain 
security.

#Hardware requirements

Recommendations for hardware requirements are supplied for guidance only.
This section lists the minimum hardware requirements for WebSphere Product 
Center. However, the actual requirements for your system may be greater, 
depending on the complexity of your specific WebSphere Product Center 
environment, throughput, and data object size. The following information is for 
the WebSphere Product Center system only. If you run other applications on the 
same system, make appropriate adjustments. 

The following represents the minimum AIX hardware requirements:

Server hardware requirements
Processor: 2 CPU configuration on IBM pSeries 630 Model 6C4 with a 
minimum processor speed of 1.0 GHz
Memory: 6 GB
Disk space: 20 GB (dedicated for application server), 4 GB (temporary 
partition) 

Additional server hardware requirements:
1. Additional CPUs may be required based on capacity requirements
2. Additional memory may be required based on capacity requirements
3. Additional servers for added capacity and/or redundancy
4. Multi-server installations require network attached shared storage

The following represents the minimum client hardware requirements for client 
access to WebSphere Product Center:

Client hardware requirements
Processor: Intel-based system with a Pentium 3 processor and a minimum 
processor speed of 750 MHz
Memory: 256 MB 

#Software requirements

The software requirements for WebSphere Product Center depend on which of 
the elements of the product components are being used and whether singly or in 
combination on a particular server. Dedicated servers are recommended for the 
database.

The following represents the software requirements for WebSphere Product 
Center:

Operating system		
AIX Version 5L v5.2

Web server 		
IBM WebSphere Application Server Network Deployment Version 5.0.2*	

Database		
IBM DB2 Universal Database Information Integrator Version 8.1 Advanced 
Edition*

Other required software (based on needed function)		
IBM Java Development Kit Version 1.3.1	 (Available as part of IBM's WebSphere 
Application Server Network Deployment Version 5.0.2)
WebSphere MQ Series Version 5.3*	
WebSphere Business Integration Adapter for WebSphere MQ Version 2.5.0* **	
WebSphere Business Integration Adapter Framework Version 2.4.0* ** 	

*Product is included with the offering.	
** Required when integrating with a process hub

The following represents the software requirements for client access to 
WebSphere Product Center:

Operating system (one of the following)
Microsoft Windows 2000 Professional Service Pack 3
Microsoft Windows XP Professional Service Pack 1

Browser
Microsoft Internet Explorer Version 6.0 Service Pack 1

#Team Requirements
The following personnel may beare needed for the installation and maintenance 
of WPC.
Project Manager
Database Administrator
WPC Application Administrator
System Administrator (may be the same as the WPC Application 
Administrator)
Network Operations
Security/Firewall Administrator 



WPC Installation for AIX operating environment
=================================

To install and configure the WPC 5.0.1-IF010#01  environment on an AIX operating environemtn. Perform the tasks as they are ordered below:

Database setup and configuration
=================================
This section covers the database configuration guidelines that are used to 
properly install WPC.  For WebSphere Product Center 5.0.0, only IBM DB2 
Universal Database Information Integrator Version 8.1 Advanced Edition is 
supported. Future versions will support additional database platforms.

#Satisfy prerequisites
Install the DB2 II 8.1 Advanced Edition on AIX Version 5L v5.2
Ensure the DB2 installation is configured to OS level user authentication for 
database connections

When the above prerequisites have been satisfied, use the following guidelines 
outlined in this section to create and setup the WPC database.

#Create AIX user 
Create the AIX User WPC for use by WPC
Set the primary group to db2iadm1 in AIX or its equivalent as created

Note: 	It is recommended to use the SMIT Administration Utility of AIX 5L to 
create a new AIX user.

#Create new database
Sharing an existing database on a machine is not recommended due to the large 
size of primary and index keys created by WPC Applications.

Recommended:
Setup a separate database for the WPC application
Use Control Center for the creation of the database
Note: 	The database MUST be created using CODESET UTF-8. 

#Create new bufferpools 
Due to the large size of tables in WPC, the page size used to create the 
bufferpools is 16KB.

The following bufferpools are needed for use by tablespaces.
USERSBP – For use by USERS tablespace
INDXBP – For use by INDX tablespace
BLOBBP – For use by BLOB_TBL_DATA tablespace
TEMPUSRBP – For use by user's temporary tablespace
TEMPSYSBP – For use by system's temporary tablespace 

The following describes the size of each bufferpool.
Bufferpool
Size (16KB Pages)*
USERSBP 30000 
INDXBP 30000
BLOBBP 1000
TEMPUSRBP 10000
TEMPSYSBP 10000

* These figures were calibrated for a server using 4 GB of memory. The sizes can 
be increased with 0.25 times per GB increase on the database server memory.
* It is necessary that the instance be restarted to activate the bufferpools using 
db2stop and db2start commands before creating the new tablespaces.

#Create new tablespaces
Due to the large size of tables in WPC the page size used to create the 
tablespaces is 16KB.
WPC requires the following tablespaces.
USERS 
INDX
BLOB_TBL_DATA
TEMP_USER
TEMP_SYSTEM

The following describes the type, bufferpool and the node group 
assignment to the tablespaces.
Tablespace	Type		Management	Bufferpool
USERS		REGULAR		Database	USERSBP
INDX		REGULAR		Database	INDXBP
BLOB_TBL_DATA	REGULAR		Database	BLOBBP
TEMP_USER	USER TEMPORARY	System		TEMPUSRBP
TEMP_SYSTEM	SYSTEM TEMPORARYSystem		TEMPSYSBP

Note:	If Database Managed Tablespaces are put to use, ensure that enough 
containers are created and allocated for each tablespace.

#Add database user and grant permissions
Create the database user WPC and give this user the following permissions using 
the instance owner login  (default instance owner login is db2inst1):
DBADM
CREATETAB
BINDADD
CONNECT
CREATE_NOT_FENCED
IMPLICIT_SCHEMA
LOAD ON DATABASE
Note: 	Use of Control Center is recommended for granting permissions to the 
user. 

Sample SQL  as created by Control Center:
GRANT DBADM, CREATETAB, BINDADD, CONNECT, CREATE_NOT_FENCED, 
IMPLICIT_SCHEMA, LOAD ON DATABASE TO USER WPC

In addition to this, grant permission to use space on all the WPC specific 
tablespaces.

Sample SQL  as created by Control Center:
GRANT USE OF TABLESPACE USERS TO WPC
GRANT USE OF TABLESPACE INDX TO WPC
GRANT USE OF TABLESPACE BLOB_TBL_DATA TO WPC
GRANT USE OF TABLESPACE TEMP_USER TO WPC

#Create a new schema
Login into the database as the instance owner and create a new schema WPC for 
user WPC.
Note:	Use of Control Center is recommended for the creation of the new 
schema.

Sample SQL as created by Control Center:
CREATE SCHEMA WPC AUTHORIZATION WPC 

#Catalog the node and the database on App Server
When running application on a different server
Catalog database to be able to connect to the database from application run the 
following commands on app server
 
db2 "catalog tcpip node <nodename> remote <dbhostname> server 50000/tcp"
db2 terminate
db2 "catalog database <dbname> as <dbname> at node <nodename>"
db2 terminate

Example:
db2 "catalog tcpip node NODE0001 remote trigprd server 50000/tcp"
db2 terminate
db2 "catalog database wpcdb as wpcdb at node NODE0001"
db2 terminate


When running application and database on the same server
There is an issue when running an application on the same box with DB2 on AIX. 
The following two fixes are required to make the application work.
1. Export EXTSHM and set DB2ENVLIST with db2set
export EXTSHM=ON
db2set DB2ENVLIST=EXTSHM
Issue 'db2stop force' and 'db2start' 

Update the .bashrc and .profile for the db2inst1 and the WPC application 
database user on the server  to export EXTSHM=ON. 

2. Use the loopback technique to catalog the local instance and database as a 
remote instance and database
a). Issue the CATALOG TCPIP NODE command to catalog the local instance as a 
remote node:
CATALOG TCPIP NODE <somename> REMOTE <hostname/ip> SERVER 
<sname/port#>
Where:  
	somename - arbitrary name for the remote instance
	hostname/ip - hostname or IP addr of db server
	sname/port# - service name or port# for the connection port of the local DB2 
instance, in the /etc/services file

b). Issue the CATALOG DB command to catalog the local db as a remote db:
CATALOG DB <dbname> AS <alias> AT NODE <somenode>
Where:  
	dbname - actual name of local db on the db server
	alias - alias name of the local db
	somename - node name specified in prev. step

c). Issue 'db2stop force' and 'db2start'. 
After this you should connect using the <alias> specified in Step b (above).


#DB2 database profile registry updates

The following Profile Registry variables are required for use by WPC:

	DB2_INDEX_2BYTEVARLEN
	DB2_RR_TO_RS
	DB2CODEPAGE


Other Profile Registry variables are not required, but may be set if there is a 
specific requirement.

DB2_INDEX_2BYTEVARLEN
Description: This variable controls the size of index keys that can be created on 
the database. By default the maximum index key size in DB2 for indexes 
containing variable length columns is 255. By setting this variable to ON index 
keys containing variable length columns can be larger that 255.

Value: Set it to ON

Example:
db2set db2_index_2bytevarlen=ON

DB2_RR_TO_RS
Description: Next key locking guarantees Repeatable Read (RR) isolation level by 
automatically locking the next key for all INSERT and DELETE statements and 
the next higher key value above the result set for SELECT statements. 
For UPDATE statements that alter key parts of an index, the original index key is 
deleted and the new key value is inserted. Next key locking is done on both the 
key insertion and key deletion. The skipping behavior affects the RR, Read 
Stability (RS), and Cursor Stability (CS) isolation levels. (There is no row locking 
for Uncommitted Read (UR) isolation level.) When DB2_RR_TO_RS is on, RR 
behavior cannot be guaranteed for scans on user tables because next key locking 
is not done during index key insertion and deletion. 
Catalog tables are not affected by this option. The other change in behavior is 
that with DB2_RR_TO_RS on, scans will skip over rows that have been deleted 
but not committed, even though the row may have qualified for the scan.
Value: Set it to ON

Example:
db2set db2_rr_to_rs=ON

DB2CODEPAGE
Description: Codepage is used to specify the character set that is used during 
export and import of data in DB2. Set it to 1208
Value : Set it to 1208
		
Example:
db2set db2codepage=1208

DB2 Database Manager configuration
The following Database Manager Configuration parameters have to be set 
for use with WPC.

	MON_HEAP_SZ - Database System Monitor Heap Size
	SHEAPTHRES - Sort Heap Threshold
	ASLHEAPSZ  - Application Support Layer Heap Size
	QUERY_HEAP_SZ - Query Heap Size
	MAXAGENTS - Maximum Number of Agents


MON_HEAP_SZ
Description: The memory required for maintaining the private views of the 
database system monitor system monitor data is allocated from the monitor 
heap. Its size is controlled by the mon_heap_sz configuration parameter.
Value: Set it to 30000

SHEAPTHRES
Description: Private and shared sorts use memory from two different memory 
sources. The size of the shared sort memory area is statically predetermined at 
the time of the first connection to a database based on the value of sheapthres. 
This has to at least two times the size of sortheap of any database hosted by the 
DB2 instance.
Value: Set it to 20000

ASLHEAPSZ
Description: The application support layer heap represents a communication 
buffer between the local application and its associated agent. This buffer is 
allocated as shared memory by each database manager agent that is started.
Value: Set it to 4200

QUERY_HEAP_SZ
Description: This parameter specifies the maximum amount of memory that can 
be allocated for the query heap. A query heap is used to store each query in the 
agent's private memory. As a minimum, you should set query_heap_sz to a value 
at least five times larger than aslheapsz.
Value: Set it to 524280

MAXAGENTS
Description: This parameter indicates the maximum number of database 
manager agents, whether coordinating agents or subagents, available at any 
given time to accept application requests. The value of maxagents should be at 
least the sum of the values for maxappls in each database allowed to be accessed 
concurrently. If the number of databases is greater than the numdb parameter, 
then the safest course is to use the product of numdb with the largest value for 
maxappls.
Value: Set it to 400

Exaple Script :
update dbm cfg using MON_HEAP_SZ 30000;
update dbm cfg using SHEAPTHRES 20000;
update dbm cfg using ASLHEAPSZ 4200;
update dbm cfg using QUERY_HEAP_SZ 524280;
update dbm cfg using MAXAGENTS 400;
	


DB2 database configuration parameters
The following Database Configuration parameters must be set for use with 
WPC.
	
	DFT_QUERYOPT - Default query optimization class
	DBHEAP - Database heap
	CATALOGCACHE_SZ  - Catalog cache size
	LOGBUFSZ - Log buffer size
	UTIL_HEAP_SZ  - Utilities heap size
	BUFFPAGE - Buffer pool size 
	LOCKLIST - Maximum storage for lock list
	APP_CTL_HEAP_SZ - Maximum application control heap size 
	SORTHEAP - Sort list heap 
	STMTHEAP - SQL statement heap
	APPLHEAPSZ - Default application heap
	STAT_HEAP_SZ - Statistics heap size
	MAXLOCKS - Percentage of lock lists per application 
	LOCKTIMEOUT - Lock timeout
	NUM_IOCLEANERS - Number of asynchronous page cleaners
	NUM_IOSERVERS - Number of I/O servers
	MAXAPPLS - Maximum number of active applications
	AVG_APPLS - Average number of active applications
	MAXFILOP - Maximum DB files open per application  
	LOGFILSIZ - Log file size
	LOGPRIMARY - Number of primary log files      
	LOGSECOND - Number of secondary log files


DFT_QUERYOPT
Description: The query optimization class is used to direct the optimizer to use 
different degrees of optimization when compiling SQL queries. This parameter 
provides additional flexibility by setting the default query optimization class.
Value: Set it to 9.

DBHEAP
Description: There is one database heap per database, and the database manager 
uses it on behalf of all applications connected to the database. It contains control 
block information for tables, indexes, table spaces, and buffer pools. It also 
contains space for the log buffer (logbufsz), and the catalog cache (catalogcache_sz). 
Therefore, the size of the heap will be dependent on the number of control blocks 
stored in the heap at a given time. The control block information is kept in the 
heap until all applications disconnect from the database. 
The minimum amount the database manager needs to get started is allocated at 
the first connection. The data area is expanded as needed up to the maximum 
specified by dbheap. 
Value: Set it to 65448

CATALOGCACHE_SZ
Description: This parameter indicates the maximum amount of space that the 
catalog cache can use from the database heap (dbheap).
Value: Set it to 6000

LOGBUFSZ
Description: This parameter allows you to specify the amount of the database 
heap (defined by the dbheap parameter) to use as a buffer for log records before 
writing these records to disk This parameter must also be less than or equal to 
the dbheap parameter.
Value: Set it to 4096

UTIL_HEAP_SZ 
Description: This parameter indicates the maximum amount of memory that can 
be used simultaneously by the BACKUP, RESTORE and LOAD and load 
recovery utilities.
Value: Set it to 5000

BUFFPAGE
Description: The buffpage parameter controls the size of a buffer pool when the 
CREATE BUFFERPOOL or ALTER BUFFERPOOL statement was run with 
NPAGES -1; otherwise, the buffpage parameter is ignored and the buffer pool will 
be created with the number of pages specified by the NPAGES parameter.
Value: Set it to 22000



LOCKLIST
Description: This parameter indicates the amount of storage that is allocated to 
the lock list. There is one lock list per database and it contains the locks held by 
all applications concurrently connected to the database. This parameter might 
require an increase depending the size of the database.
Value: Set it to 6000

APP_CTL_HEAP_SZ 
Description: This parameter determines the maximum size, in 4 KB pages, for the 
application control shared memory. Application control heaps are allocated from 
this shared memory.
Value: Set it to 4500
SORTHEAP 
Description: This parameter defines the maximum number of private memory 
pages to be used for private sorts, or the maximum number of shared memory 
pages to be used for shared sorts.
Value: Set it to 2650

STMTHEAP 
Description: The statement heap is used as a workspace for the SQL compiler 
during compilation of an SQL statement. This parameter specifies the size of this 
workspace.
Value: Set it to 30000

APPLHEAPSZ 
Description: This parameter defines the number of private memory pages 
available to be used by the database manager on behalf of a specific agent or 
subagent.
Value: Set it to 45000

STAT_HEAP_SZ 
Description: This parameter indicates the maximum size of the heap used in 
collecting statistics using the RUNSTATS command.
Value: Set it to 22000

MAXLOCKS 
Description: Lock escalation is the process of replacing row locks with table 
locks, reducing the number of locks in the list. This parameter defines a 
percentage of the lock list held by an application that must be filled before the 
database manager performs escalation.
Value: Set it to 30
LOCKTIMEOUT 
Description: This parameter specifies the number of seconds that an application 
will wait to obtain a lock. 
Value: Set it to 8.

NUM_IOCLEANERS 
Description: This parameter allows you to specify the number of asynchronous 
page cleaners for a database. These page cleaners write changed pages from the 
buffer pool to disk before a database agent requires the space in the buffer pool.
Value: Set it to 7.

NUM_IOSERVERS 
Description: I/O servers are used on behalf of the database agents to perform 
prefetch I/O and asynchronous I/O by utilities such as backup and restore. This 
parameter specifies the number of I/O servers for a database.
Value: Set it to 8.

MAXAPPLS 
Description: This parameter specifies the maximum number of concurrent 
applications that can be connected (both local and remote) to a database.
Value: Set it to 400

AVG_APPLS 
Description: The SQL optimizer to help estimate how much buffer pool will be 
available at run-time for the access plan chosen uses this parameter.
Value: Set it to 2.

MAXFILOP 
Description: This parameter specifies the maximum number of file handles that 
can be open for each database agent.
Value: Set it to 640.



LOGFILSIZ 
Description: This parameter defines the size of each primary and secondary log 
file. The size of these log files limits the number of log records that can be written 
to them before they become full and a new log file is required.
Value: Set it to 60000

LOGPRIMARY    
Description: The primary log files establish a fixed amount of storage allocated to 
the recovery log files. This parameter allows you to specify the number of 
primary log files to be pre-allocated.
Value: Set it to 40.

LOGSECOND 
Description: This parameter specifies the number of secondary log files that are 
created and used for recovery log files (only as needed). When the primary log 
files become full, the secondary log files (of size logfilsiz) are allocated one at a 
time as needed, up to a maximum number as controlled by this parameter.
Value: Set it to 40

Example Script: (Name of the database used is WPCDB)
db2 connect to wpcdb
update db cfg for wpcdb using DFT_QUERYOPT 9;
update db cfg for wpcdb using DBHEAP 65448;
update db cfg for wpcdb using CATALOGCACHE_SZ 6000;
update db cfg for wpcdb using LOGBUFSZ 4096;
update db cfg for wpcdb using UTIL_HEAP_SZ 5000;
update db cfg for wpcdb using BUFFPAGE 22000;
update db cfg for wpcdb using LOCKLIST 6000;
update db cfg for wpcdb using APP_CTL_HEAP_SZ 4500;
update db cfg for wpcdb using SORTHEAP 2650;
update db cfg for wpcdb using STMTHEAP 30000;
update db cfg for wpcdb using APPLHEAPSZ 45000;
update db cfg for wpcdb using STAT_HEAP_SZ 22000;
update db cfg for wpcdb using MAXLOCKS 30;
update db cfg for wpcdb using LOCKTIMEOUT 8;
update db cfg for wpcdb using NUM_IOCLEANERS 7;
update db cfg for wpcdb using NUM_IOSERVERS 8;
update db cfg for wpcdb using MAXAPPLS 400;
update db cfg for wpcdb using AVG_APPLS 2;
update db cfg for wpcdb using MAXFILOP 640;
update db cfg for wpcdb using LOGFILSIZ 60000;
update db cfg for wpcdb using LOGPRIMARY 40;
update db cfg for wpcdb using LOGSECOND 40;
Install DB2 Admin/Developer/Run-Time Client on Application Server
Install DB2 Admin/Developer/Run-Time Client on the WebSphere Application 
Server. Create any one of the available types of clients.
Create a DB2 Instance on WAS
Create a db2 instance on the WebSphere Application server. The db2inst1 user or 
the WPC application user can own the instance.
Note:	If the instance is owned by the db2inst1 user (or any other user other 
than WPC application user) then create a softlink for the  
WPC application user at $HOME/sqllib to the same directory of the 
instance owner.

Example:
Execute the following command from WPC application user home directory
	ln -s /home/db2inst1/sqllib/ sqllib



 
#DB2 Database setup check list

Use the following checklist to verify the required DB2 database has been setup 
properly for use with WPC.
	Check the DB2 server release
Ensure the DB2 Server release complies with the Installation Requirements.

	Check the database codeset
The character set and national character set should be UTF8. Connect as system 
user and check the character set of the database.
(On the Database Server logged in as instance owner)
$db2 get db cfg for <database name>
This should have "Database code set" set to UTF-8

	Check the parameter file entries
Follow the DB2 configuration sections in this chapter to make sure you have 
made required parameter changes for the DB2 Registry Variables, Database 
Manager and the Database.

	Check the tablespaces setup
Make sure the required tablespaces are setup in the database. 

	Check the database user setup
View the database user name and password in 
$TOP/etc/default/common.properties file and make sure that the database user is 
created and all required privileges are granted to the user. 

	Check the connectivity to the database server
The database server and the database server node must be catalogued on the 
application server and the database must be accessible from the application 
server.  
Check the database connectivity with $TOP/bin/ test_db.sh
Check the JDBC connectivity with $TOP/bin/ test_java_db.sh SID of the database; 
in other words, OCI utilities such as sqlplus must be able to connect using a 
service name which is the same as the SID.

Check the listener on the database server
The database must be accessible from the application server.




WPC Installation
===================
To install and configure the WPC, perform the tasks as they are listed in this 
chapter.  
Satisfy prerequisites:
Ensure that all installation requirements are fulfilled 
Create a user with the proper privileges and user profile, as required, on the 
WebSphere Application Server
It is assumed that bash is used as the default shell script. If using a different 
shell such as "sh," then execute bash first. Bash must be installed in the 
directory /bin/bash. 

Preparing the installation media
Preparing a product CD
If your WebSphere Product Center 5.0 product is on a CD, do the 
following to prepare the computer for installation.

On AIX:
Insert the product CD into the CD drive of the AIX computer and execute the 
following command to mound the CD:
mount –V cdrfs –o ro /dev/cd0 /cdrom 

Using Passport Advantage
If you obtain your WebSphere Product Center product from Passport 
Advantage, do the following to prepare the installation media:
On UNIX, download the compressed .tar file from Passport Advantage and 
then inflate it to extract the installation files

#General procedures for using installation media
This section describes general procedures for using the installation media.

Invoking the graphical WPC installer
The graphical WebSphere Product Center Installer presents you with a wizard 
that allows you to make choices about the installation of WebSphere Product 
Center. You invoke the Installer by running executables from the installation 
media. This section describes how to invoke Installer for WebSphere Product 
Center on a Unix environment.

If you are running CDE on the UNIX computer: If you are running the 
Common Desktop Environment (CDE) and working on the UNIX computer 
directly then you can navigate the installation media and double-click the .bin 
file to invoke the Installer.
You can also navigate the installation media and execute the .bin file at the 
command line.

If you are connecting to the UNIX computer through X emulation software: If 
you are using a Windows computer to connect to the UNIX computer through X 
emulation software do the following to invoke the installer:
1.	Configure your environment for X emulation software.
2.	Execute the .bin file specific to the operating system. The following example 
shows how to do so on an AIX computer. 
	# ./setupAIX.bin
	The graphical installer starts on the Windows computer that you are using to 
connect to the UNIX computer.

#     Performing a silent installation
You can perform a silent installation of WebSphere Product Center, where you 
provide your installation choices in a file rather than at the screens of the 
installation wizard. This is particularly helpful when you have to perform 
multiple installations that are identical.

Executing silent installation
To execute the silent installation, you run the installer executable at the 
command line with several options, including the name of the response file you 
prepared. To install silently, use the following command line.
./setupAIX.bin –P installLocation=<value> -silent
The following example shows how to do so on the AIX computer.
./setupAIX.bin –P installLocation/opt/IBM/WPC –silent

 Optionally, the silent install can be performed using an options file:
./setupAIX.bin –P -options <options file name > -silent
The following example shows how to do so on the AIX computer.
./setupAIX.bin –P –options /home/wpc/install.txt –silent

The options file must contain the following line.
	-P installLocation=<value>

#Record User Selection
The installer can record user selections during an interactive install to a file. This 
file is generated when installation is complete. This file can be used as a response 
file for silent installs on other machines (recorded user selection is applied to 
these installs). To use this feature type, use the following command line.
./setupAIX.bin –options –record <file name>

Installing WebSphere Product Center
====================================
This section provides instructions to install WebSphere Product Center. You can 
select to install the software product using the graphical installer or silently from 
the command line.

#Installing WebSphere Product Center using the graphical installer
Do the following to install WebSphere Product Center: 

1.	Invoke the installer as described in "Invoking the graphical WPC installer".
2.	At the language selection prompt, choose the desired language from the 
drop-down menu and click OK.
3.	At the "Welcome" screen click Next.
4.	At the IBM license acceptance screen, click I accept the terms in the license 
agreement and then click OK.
5.	At the product directory screen, perform one of the following tasks:
?	Type the full path of the directory into which you want to install WPC in the 
Directory Name field and click Next
?	Click Browse to select a directory and click Next
?	Accept the default path and click Next
6.	The summary screen lists the features that will be installed, the specified 
product directory, and the amount of disk space required. Read the 
information to verify it and then click Next.
7.	After the Installer finishes successfully, click Finish.
Note: 	Log details are in provided in <install location>/log.txt

#Set environment variables
Set TOP variable
Purpose: To set the shell variable TOP to point to the WPC installation directory.
Edit the following file:
$HOME/.bashrc

Example on UNIX:
If the application is installed in the directory:
	/home/user/john/WPCV50
Then, from the command-line:
	export TOP=/home/user/john/WPCV50

#Edit initialization script (init_ccd_vars.sh)
The "init_ccd_vars.sh file" is sourced to initialize WPC shell variables. For WPC 
to run properly several key variables, which are listed in this section, must be set 
in the file "init_ccd_vars.sh". If these variables are not set, errors will occur when 
starting WPC. 
Location of file: <install location>/setup/init_ccd_vars.sh

#Set JDK_HOME
Purpose: To define the location of the Java runtime installation. This parameter 
must be located before the TOP parameter.
Example on UNIX:
export JDK_HOME=/usr/java131


#Set Common Unix Utilities
Purpose: To set the properties to the common UNIX utilities used by WPC 
scripts.
Set the properties for the following utilities:
	AWK
	CP
	ECHO
	GREP
	MKDIR
	RM
	SED
	TOUCH
	TR
	BC
	CAT
Example on UNIX:
export CP=cp
export RM="rm –rf"
export ECHO=echo
export TOUCH=touch
export MKDIR="mkdir –p"
export TR=tr
export GREP=grep
export AWK=awk
export SED=sed
export CAT=cat
export BC=bc

#Set Home Directories for WebSphere
Purpose: To set the properties to the common UNIX utilities used by WPC 
scripts.
Set the following variables:
	WAS_HOME - the directory in which WebSphere is installed
	WAS_NODENAME - the node name of the WebSphere Application Server.  

Usually this is the local host name.

#Setting memory flags for different modules
All of the different WPC modules are run using a java virtual machine. The user 
can specify the memory used for these modules by changing the memory flags 
provided for this purpose. 
For example, the entry, 
export SCHEDULER_MEMORY_FLAG='-Xmx1024m -Xms48m' 

specifies that the SCHEDULER module has the initial memory setting (specified 
by the option -Xms) of 64MB and the maximum memory setting (specified by the 
option -Xmx) of 48MB.
Note:	Please refer to the comments in $TOP/setup/init_ccd_vars.sh for more 
information. 

It is recommended to use the following memory flag settings for WPC Services:
export APPSVR_MEMORY_FLAG='-Xmx512m -Xms64m'
export ADMIN_MEMORY_FLAG='-Xmx64m -Xms48m'
export EVENTPROCESSOR_MEMORY_FLAG='-Xmx64m -Xms48m'
export QUEUEMANAGER_MEMORY_FLAG='-Xmx64m -Xms48m'
export SCHEDULER_MEMORY_FLAG='-Xmx1024m -Xms48m'

#Source $TOP/setup/init_ccd_vars.sh
Purpose: To define the location of the WPC initialization script.
From the shell prompt:
	$TOP/setup/init_ccd_vars.sh

Note: 	The default shell init script .bashrc should be modified to set TOP and 
source init_ccd_vars.sh. 
 
Make sure modifications are made to ~/.bashrc. The location of the file 
may differ depending on the bash installation.

Edit .bashrc to include the following:

        # WPC init
        export TOP=<path to WPC{VERSION} directory>
        WPC_INIT_VARS=$TOP/setup/init_ccd_vars.sh
        
        if [ -f $WPC_INIT_VARS ]; then
            . $WPC_INIT_VARS
        else
            echo "Error: file '$WPC_INIT_VARS' not found"
        fi

#Configure Run Time Properties
The following steps configure the run time properties used by the system, which 
are defined in the file common.properties.
Edit the following file:

	$TOP/etc/default/common.properties
  
#Setup Database Information
Purpose: To setup the information allowing access to the 
database.  Tomcat uses this information to login to the database 
and setup connection pooling.

Purpose: To setup the information allowing access to the 
database. Tomcat uses this information to login to the database 
and setup connection pooling. 

Set Properties: 
db_userName
db_password
db_url

Example:

Assume the username is "Wpcapp", password is "track1", the 
hostname of the database server is "jupiter", and the SID of the 
Oracle database instance is "pauprd."

The following properties are set:

db_userName=wpcapp
db_password=track1
db_url=jdbc:oracle:thin:@jupiter:1521:pauprd

Note:	The referenced port is the listener port. In the example above, 
the port is 1521.

Set Properties: 
db_userName
db_password
db_url

Example:

Assume the username is "WPCapp", password is "track1", the 
hostname of the database server is "jupiter", and the database 
instance is "pauprd."

The following properties are set:

db_userName=WPCapp
db_password=track1
db_url=jdbc:db2:pauprd 

#Setup Timezone
Purpose: To define the time zone property.
Set Property: timezone

Use the following values:

	-8 for PACIFIC
	-7 for MOUNTAIN
	-6 for CENTRAL
	-5 for EASTERN
	- 2 for ENGLAND
	- 1 for CENTRAL EUROPE

Example:

If business hours are set for the West Coast U.S, then set the 
following:

	timezone=-8

#Setup FTP Directory
Purpose:  To define the directory where data files are transferred to using ftp (for 
an import). ).  If FTP is not used for data import, this property can be left at the 
default.  If FTP is not used for data import, this property can be left at the default.

Set property:
	ftp_root_dir

Note:	Files are stored in  /u01/ftp/COMPANY_CODE/files will show up in the 
ftp section of the Docstore. If files are put into /u01/ftp, they will not 
show up. Therefore, the property must be set to the organizations ftp 
  directory.
	For example, /u01/ftp/WPC/files.

Example on UNIX:
	ftp_root_dir=/u01/ftp/


Note: 	The ftp directory ends with a forward slash '/'. WPC reads from and 
writes to this FTP directory. 
 
Set this directory to allow read/write privilege for WPC users.

# Setup Tmp Directory
Purpose: This setting identifies the temporary directory on the server.server.
Set property:
	tmp_dir

Example on UNIX:
	tmp_dir=/tmp/


Note: 	The tmp directory ends with a forward slash '/'. 
 
Set this directory to allow read/write privilege for WPC users.

#WebSphere Application Server configuration

This section provides instructions required to run WPC with WebSphere 
Application Server 5.0.  

IBM WebSphere Application Server 5.0 Configuration
In order to use WPC with WebSphere Application Server (WAS) 5.0, follow the 
configuration instructions described in the following sections.
	Change configuration settings
	Start WebSphere default server and Administrative Console
	Add WebSphere group and change WebSphere settings
	Run WebSphere Scripts

#Change configuration settings
In addition to the standard variables, the following need to be defined in 
$TOP/setup/init_ccd_vars.sh.:

Name			Value
WAS_HOME		home directory of WebSphere. I.E. /usr/WebSphere/AppServer
WAS_APPSERVERNAME	name of the Application Server you are going to use (within websphere). This must be unique.
WAS_NODENAME		The node name of the WebSphere Application Server on which you are running. Usually this will be the same as the system's hostname
WAS_VHOST (optional)	The name of the WebSphere Virtual Host to which to bind the WPC Application. This variable is only needed if you are going to run 				multiple WPC application servers on the same WebSphere instance. Note: this is not the same as an HTTP server Virtual Host.

#Start default server and administrative console
		To start the WAS default server, issue the following command as root:

		${WAS_HOME}/bin/startServer.sh server1
#Add WAS group
On AIX, you can add a group using the SMIT administration tool.
Note: Make sure the CCD user is part of the WAS group.

	Log into the WebSphere administrative console. (normally runs at 
http://your-server-name:9090/admin)
	Click Servers -> Application Servers
	Click on the default server (server1)
	Click "Process Definition"
	Click "Process Execution"
	Change UMASK to "002".
	Change "Run as Group" to the WAS group you created.  If the WebSphere 
default server is not running as root, the WebSphere user should also be in 
the WAS group.
	Change the permissions on the WebSphere directory so that the WAS group 
has write permission.
	
	# chgrp –R wasgroup ${WAS_HOME}	
	# chmod –R g+w ${WAS_HOME}
		
#Run WAS scripts
After completing the previous WPC installation steps, run the following scripts 
in the listed order: 
1.	$TOP/bin/websphere/create_appsvr.sh 
2.	$TOP/bin/websphere/create_vhost.sh
2.	$TOP/bin/websphere/install_war.sh 

#Running multiple instances of WPC under the same WebSphere 
server

To run multiple instances of WPC using one WebSphere server, the following 
tasks must be performed:
	Requires that the WebSphere Administration Server be running as root. 
	Install each instance normally as above, but do not yet run create_appsvr.sh 
or install_war.sh 
	Make sure each instance has a unique WAS_APPSERVERNAME and 
WAS_VHOST defined in init_ccd_vars.sh, and unique application ports 
defined in common.properties
	Run the following scripts in the following order under each instance: 
	$TOP/bin/websphere/create_vhost.sh 
	$TOP/bin/websphere/create_appsvr.sh 
	$TOP/bin/websphere/install_war.sh 


#Setup database schema

Note: 	The file common.properties must be setup before creating the database 
schema. (Refer to the section "Configure Run Time Properties" in this 
chapter)

#Verify database user
Verify that the database user referenced in common.properties exists in the 
database with the proper privileges. 
Execute the following shell script to test that WPC can talk to the database:
$TOP/bin/test_java_db.sh
	
The script attempts to parse common.properties and login to your database.
If the script produces an error, please modify the common.properties file to 
set the correct database user, or verify with you Database Administrator that 
the database user was created correctly.

#Create database schema
Once the DB user is setup correctly, the WPC database schema can be created.
Execute the shell script:

	$TOP/src/db/schema/create/create_schema.sh

The script first shows which database it is trying to connect to. Then the system 
prompts the user to confirm with "y" to continue or "n" to stop.
Type "y" to continue.

Note: 	Once the database schema is created, there is no need to run 
create_schema.sh again. The database schema only needs to be created 
once.

#Setup a company to test
This section sets up a company that is used to test the WPC installation. A 
company must be created in order to login to WPC. To create a new company, 
refer to the section "Create a new company".

#Create a company to test
To login to WPC, a company must be created. Do one (or both) of the following 
to create a company:

#Create Acme Company
To create a demo company called "acme", execute the following shell script:
$TOP/src/db/schema/acme/create_acme.sh --code=acme

The company Acme is created with four users:
	Admin, bwilson. Jwilson, vjackson
	All users are provided the password "trinitron"

#Create Empty Company
To create an empty company called "demo", with no predefined data (quicker 
than creating the demo acme company), execute the following shell script:
$TOP/src/db/schema/cmp/create_cmp.sh --code=demo

The company demo is created with a single user:
	Admin
	The password for Admin is "trinitron"

Note:	Passwords are case-sensitive.  The Admin user is created with full 
privileges and should be used by an administrator.


#Test WPC Installation
Start WPC
	To start WPC, execute the script start_local.sh, which starts all the services 
needed to run WPC.
	$TOP/bin/go/start_local.sh 

An example of a normal output from start_local.sh:
#./start_local.sh
killing services on localhost
killing service 'appsvr_LORAX'
killing service 'admin_LORAX'
killing service 'ajp12_LORAX'
killing service 'ajp13_LORAX'
killing service 'eventprocessor'
killing service 'queuemanager'
killing service 'scheduler'
killing service 'workflow'
killing service 'rmi'
starting rmiregistry on port 17507
starting service 'admin_LORAX'
starting service 'appsvr_LORAX'
starting service 'eventprocessor'
starting service 'queuemanager'
starting service 'scheduler'
starting service 'workflow'

	Verify that the application is up and running by executing the following 
script:
   /usr/WPC/pink_tulip/austin/bin/go/rmi_status.sh

	Verify that the following services have started:
   admin
   appsvr
   eventprocessor
   queuemanager
   scheduler
   workflow

Note:	This process should take approximately 30-40 seconds, depending on the 
speed of the processor.

#WPC license file
The $TOP/bin/go/start_local.sh script above starts all of the WPC application 
services (or modules) that are needed to run WPC. 

Each module can be successfully started only if there exists a valid license file: 
$TOP/etc/default/ccd_license.xml and the license specifies that the module is 
valid. Otherwise, the module will fail to start. The errors are logged in to the 
specific log files for each module in the directory: $TOP/logs/svc.

Note:	License files are provided separately from the installation files.  Contact 
WPC support if a license file is needed to operate WPC.

#Test for valid license file
To test the validity of the WPC License file, run the script:
$TOP/bin/test_license.sh

If the IP is not correct, the license validator reports the expected IP and the 
current local IP.

#Check RMI status
Verify that the application is up and running by executing the following script:
	$TOP/bin/go/rmi_status.sh

This script contacts the RMI daemon on all the machines in the cluster and 
obtains a list of the local services on each machine.  An extended list of names is 
returned.
The following is an example of rmi_status.sh showing that all services have 
started on a machine named "LORAX":
#./rmi_status.sh
++ [success] rmistatus (Mon Aug 26 17:29:47 PDT 2003)
rmi://lorax:17507/CMP1/appsvr/appsvr_LORAX
rmi://lorax:17507/CMP1/admin/admin_LORAX
rmi://lorax:17507/CMP1/eventprocessor/eventprocessor_LORAX
rmi://lorax:17507/CMP1/scheduler/scheduler_LORAX
rmi://lorax:17507/CMP1/queuemanager/queuemanager_LORAX
rmi://lorax:17507/CMP1/workflow/workflow_LORAX

#Test database connection
To test the database connection using Java to validate the driver, run the 
following script. 
$TOP/Bin/test_java_db.sh
 
At this point, if all connections are running properly, open the 
Internet Explorer web browser and enter the URL and port for the 
WPC server.
http://www.acme.com:7507


If the create_acme.sh was used to create the Acme company demo, login 
as:
Username: bwilson
Password:  trinitron
Company: acme

If the create_cmp.sh was used to create a company, login as:

Username: Admin
Password: Trinitron
Company: acme

If the login to the application opens up the WPC Home Page, the 
installation was successful. 

#Stop the application


To stop the WPC application on the local machine, execute the following script:
	$TOP/bin/go/stop_local.sh

The script stops all the services started by WPC. Example output from 
stop_local.sh showing all services stopped:
#./stop_local.sh
stopping services on localhost
++ [success] stop service 'appsvr_LORAX' (Mon Aug 26 17:55:46 PDT 
2002)
tomcat will stop in 5 seconds
++ [success] stop service 'admin_LORAX' (Mon Aug 26 17:55:47 PDT 
2002)
admin will stop in 5 seconds
++ [success] stop service 'eventprocessor' (Mon Aug 26 17:55:47 
PDT 2002)
event processor stopped
++ [success] stop service 'scheduler' (Mon Aug 26 17:55:47 PDT 
2002)
scheduler will stop in 5 seconds
++ [success] stop service 'queuemanager' (Mon Aug 26 17:55:48 PDT 
2002)
queue manager stopped
++ [success] stop service 'workflow' (Mon Aug 26 17:55:49 PDT 
2002)
workflow stopped
killing service 'rmi'

================================================
YOU HAVE SUCCESSFULLY INSTALLED AND TESTED
WPC 5.0.1-IF010#01 ! GO TO THE NEXT SECTION TO CREATE A NEW COMPANY.
================================================

#Create a new company
Now that WebSphere has been installed and tested, create a new company for 
use with a test or production environment. If desired, more than one company 
can be created.
For example, to create an empty company called "test", with no predefined data, 
execute the following shell script:
$TOP/src/db/schema/cmp/create_cmp.sh --code=test

The company is created with a single user:
	Username: Admin 
	Password: trinitron

Note:	The Admin user is automatically created with full privileges. This user 
account is to be used by an administrator.

 




