Configure WebSphere Portal for DB2


After installing and setting up databases, configure WebSphere Portal to populate and use these databases. Before configuring WebSphere Portal to work with DB2, ensure that the following prerequisites are met:

Notes:

Follow the appropriate procedures listed here:

Configure for databases

Follow these steps to configure WebSphere Portal to use the WebSphere Portal and Member Manager databases on DB2.

Note: A configuration template might exist to support these instructions. Refer to the WS_Installdir\runtimes\portal_v50\config\helpers (WS_Installdir is the directory where WebSphere Studio is installed.) directory for available configuration templates. Use the configuration template to update the wpconfig.properties file, as described in "Using configuration templates" in the InfoCenter of WebSphere Portal, according to the property descriptions and recommended values provided here. If you do not want to use a configuration template, follow these instructions as written.

Password considerations: For security reasons, if you elect to not store passwords in the wpconfig.properties file, you may specify passwords on the portal server command line. For example:

  1. In the command prompt, change to the directory WS_Installdir\runtimes\portal_v50\config (WS_Installdir is the directory where WebSphere Studio is installed.).
  2. Enter the following command:

    Note: If you installed the WebSphere Portal V5.0 Test Environment on WebSphere Application Server Enterprise (WAS Enterprise) V5.0.2, this command is not required.

  3. Export the current database data by entering the following command:
  4. Locate the WS_Installdir\runtimes\portal_v50\config\wpconfig.properties (WS_Installdir is the directory where WebSphere Studio is installed.) file and create a backup copy before changing any values.
  5. Edit the WS_Installdir\runtimes\portal_v50\config\wpconfig.properties (WS_Installdir is the directory where WebSphere Studio is installed.) file and enter the values that are appropriate for your environment.
    Note the following information:
    Section Property Value
    Database properties DbSafeMode

    Description: This only applies to database-specific tasks. If this property is set to true no database-specific updates will be performed, such as create/modify/drop database. The property should be used if a preconfigured database (from a previous installation) already exists. If the property is set to false the database will be updated, and the pre-existing database configuration is overwritten.

    Recommended value: false

    Default value: false

    DbType

    Description: The type of database that is used to store information for WebSphere Portal. This value indicates the type of database you are using.

    Recommended value: db2

    Default value: cloudscape

    WpsDbName

    Description: This value represents the database name (or alias name if remote) where you want the WebSphere Portal objects created. Note: This value is also the database element in the DbUrl property.

    Recommended value: wps50

    Default value: wps50

    Note: This value cannot exceed eight characters and can only contain letters and numbers. Refer to DB2 documentation for more information.

    DbDriver

    Description: This is the name of the JDBC provider that is used to import SQL files.

    Recommended value: COM.ibm.db2.jdbc.app.DB2Driver

    Default value: com.ibm.db2j.jdbc.DB2jDriver (Cloudscape)

    DbDriverDs

    Description: The data source for the JDBC provider that WebSphere Portal uses to communicate with its databases.

    Recommended value: COM.ibm.db2.jdbc.DB2XADataSource

    Default value: com.ibm.db2j.jdbc.DB2jXADataSource (Cloudscape)

    DbUrl

    Description: The database URL that is used to access the WebSphere Portal database with JDBC. The value must conform to standard JDBC URL syntax. Note: The database element of this value should match the value of WpsDbName.

    Recommended value: jdbc:db2:wps50

    Default value: jdbc:db2j:wps50;create=true (Cloudscape)

    DbUser

    Description: This value should be an administrative user in the database. The administrator is only necessary if WebSphere Portal is creating the database. A user is necessary to connect to WpsDbName.

    Recommended value: db2admin

    Default value: db2admin

    DbPassword

    Description: This password must match the password for the database user ID that is indicated in DbUser.

    Recommended value: No recommended value for this property

    Default value: password

    DbLibrary

    Description: DbLibrary is machine specific. You must locate the db2java.zip file on your machine. For example, C:/Program Files/IBM/SQLLIB/db2java.zip, C:/Program Files/IBM/SQLLIB/java12/db2java.zip, or /home/db2admin/sqllib/java/db2java.zip.

    Note: Make sure to type the path to the correct Java library, if you have more than one on your machine.

    Recommended value: C:/Program Files/IBM/SQLLIB/java/db2java.zip

    Default value: WS_Installdir/runtimes/portal_v50/shared/app/cloudscape/db2j.jar, where WS_Installdir is the WebSphere Studio installation directory. (Cloudscape)

    WpsDsName

    Description: This value is the name of the data source to be used for the WebSphere Portal database.

    Recommended value: wps50DS

    Default value: wps50DS

    WebSphere Portal content publishing Database properties WpcpDbName

    Description: This value represents the database name (or alias name if remote) where you want the content publishing objects to be created.
    Note: This value is also the database element in the WpcpDbUrl property.

    Recommended value: wpcp50

    Default value: wps50

    Note: This value cannot exceed eight characters and can only contain letters and numbers. Refer to DB2 documentation for more information.

    WpcpDbUser

    Description: This value should be an administrative user in the database. If WebSphere Portal is creating the database, the user must be an administrative user. If you choose to use one database to store all WebSphere Portal, Member Manager, and content publishing information, this user must be different from DbUser.

    Recommended value: db2admin

    Default value: wcmdbadm

    WpcpDbPassword

    Description: This password must match the password for the database user ID that is indicated in WpcpDbUser.

    Recommended value: No recommended value for this property

    Default value: password

    WpcpDbUrl

    Description: The database URL that is used to access the content publishing database with JDBC. The value must conform to standard JDBC URL syntax. Note: The database element of this value should match the value of WpcpDbName.

    Recommended value: jdbc:db2:wpcp50

    Default value: jdbc:db2j:wps50;create=true (Cloudscape)

    WpcpDbEjbPassword

    Description: The password for Enterprise Java Bean (EJB) user. Only needed for MS SQL Server and Oracle.

    Recommended value: No recommended value for this property

    Default value: ejb

    FeedbackDbName

    Description: This value represents the database name (or alias name if remote) where you want the feedback objects to be created.Note: This value is also the database element in the FeedbackDbUrl property.

    Recommended value: fdbk50

    Default value: wps50

    Note: This value cannot exceed eight characters and can only contain letters and numbers. Refer to DB2 documentation for more information.

    FeedbackDbUser

    Description: This value should be an administrative user in the database. If WebSphere Portal is creating the database, the user must be an administrative user.

    Recommended value: db2admin

    Default value: wcmdbadm

    FeedbackDbPassword

    Description: This password must match the password for the database user ID that is indicated in FeedbackDbUser.

    Recommended value: No recommended value for this property

    Default value: password

    FeedbackDbUrl

    Description: The database URL that is used to access the feedback database with JDBC, where <hostname> is the name of the remote server and <port> is the port where the appropriate database instance is listening. The value must conform to standard JDBC URL syntax. If you are installing content publishing under one database, this value will be the same as the value for the WpcpDbUrl property. Note: The database element of this value should match the value of FeedbackDbName.

    Recommended value: jdbc:db2:fdbk50

    Default value: jdbc:db2j:wps50;create=true (Cloudscape)

    Member Manager properties WmmDsName

    Description: This value is the name of the data source to be used for the Member Manager database.

    Recommended value: wmmDS

    Default value: wmmDS

    WmmDbName

    Description: This value represents the database name (or alias name if remote) where you want the Member Manager objects to be created.If Member Manager will share the WebSphere Portal database, this value will be the same as the value for WpsDbName. Note: This value is also the database element in the WmmDbUrl property.

    Recommended value: wps50

    Default value: wps50

    Note: This value cannot exceed eight characters and can only contain letters and numbers. Refer to DB2 documentation for more information.

    Note: If WebSphere Portal Version 5.0.2.1 and a previous version of WebSphere Portal coexist on the same machine, this value must be different than the WebSphere Member Services database name in the previous version of WebSphere Portal.

    WmmDbUser

    Description: This value should be an administrative user in the database.

    Recommended value: db2admin

    Default value: db2admin

    Note: If you are migrating from a previous version of WebSphere Portal, this value must match the database user name for the WebSphere Member Services database from the previous WebSphere Portal version.

    WmmDbPassword

    Description: This password must match the password for the database user ID that is indicated in WmmDbUser.

    Recommended value: No recommended value for this property

    Default value: password

    WmmDbUrl

    Description: The database URL that is used to access the Member Manager database with JDBC. The value must conform to standard JDBC URL syntax. If WebSphere Portal and Member Manager are sharing a database, you will use the same database value entered for WpsDbName. Note: The database element of this value should match the value of WmmDbName.

    Recommended value: jdbc:db2:wps50

    Default value:jdbc:db2j:wps50;create=true (Cloudscape)

  6. Save the file.
  7. If you are using a local DB2 database, you can automatically create your databases by typing the following command: from the WS_Installdir\runtimes\portal_v50\config (WS_Installdir is the directory where WebSphere Studio is installed.) command line prompt. If you are using a remote DB2 database, ensure that your databases have been created and continue to the next step.
  8. Linux only: Use the following steps to export the db2instance environment in your profile and Portal Toolkit user's profile:
    1. In your .bashrc file, add
      if [ -f /home/db2admin/sqllib/db2profile ]; then . /home/db2admin/sqllib/db2profile; fi
      
      where db2admin represents your database instance.
    2. Reopen all the shells.
    3. Validate that your environment has set the DB2 profile environment variables, such as DB2INSTANCE=db2admin where db2admin represents your database instance by running the env command.
  9. Open a command prompt, and change to the directory WS_Installdir\runtimes\portal_v50\config (WS_Installdir is the directory where WebSphere Studio is installed.).
  10. Enter the following commands to validate configuration properties.
  11. Enter the following commands to run the configuration task.

    Note: If the configuration fails, verify the values in the wpconfig.properties file and then repeat this step.

  12. After importing the database tables, perform a reorg check to improve performance. Connect to each database and run the following commands from the DB2 prompt:

    connect to <database_name> user <db2_admin> using <password>
    reorgchk update statistics on table all
    terminate
    c:\> db2rbind <database_name> -l db2rbind.out -u <db2_admin> -p <password>

  13. Linux only: Enter the followoing commands:
  14. On DB2 Version 7, run the batch file shown below to enable JDBC 2.0. WebSphere Portal requires JDBC 2.0 to be used with DB2. The file <SQLLIB>\java12\inuse will exist when JDBC 2.0 is in use.
  15. Carry out the following steps to verify that WebSphere Portal V5.0 Test Environment starts successfully:
    1. Launch the WebSphere Studio.
      Linux:
      1. If you want to use the double-byte character set on Red Hat 8.0, you will need to upgrade GTK 2.0 to GTK 2.2.2 or later. However, support for Korean, Simplified Chinese, Japanese, and Traditional Chinese languages is not fully functional. To avoid these limitations, use the product in English. To upgrade GTK, refer to "(Optional) Upgrading to GTK 2.2.2 or later" in the Installation Guide of WebSphere Studio Version 5.1.2.
      2. Log out and log in as a user that is used for the development.
      3. In a command prompt, type either of the following command:/usr/bin/wssitedev51 or /usr/bin/wsappdevie51
      Windows:
      1. Select Start > Programs > IBM WebSphere Studio > Site Developer 5.1.2, Enterprise Developer 5.1.2 or Application Developer Integrated Edition 5.1.1 to start the application.
    2. From the menu, select File > New > Other > Server > Server and Server Configuration.
    3. Select WebSphere Portal version 5.0 > Test Environment and click Finish.
    4. In the Servers view, right-click the server and select Start.

Verifying configuration

  1. Verify that the WebSphere Portal server is running by opening the following URL in a browser:

    http://localhost:9081/wps/portal/!ut/p/.cmd/LoginUserNoAuth?userid=wpsadmin&password=wpsadmin

    9081 is default port number of WebSphere Portal server in the Test Environment.

Next steps

You have completed this step. Continue to the next step by choosing one of the following topics:


Related information