<<

. 15
( 87 .)



>>

and a database that satis¬es your load, change, and operation requirements.
With this new installation model, you will just need to run WPScon¬g to
change the database and/or directory server con¬guration and migrate the
data. You will not need to reinstall the product.

65
P1: GIG
WY009-04 WY009-BenNatan-v1.cls May 9, 2004 5:18




66 Chapter 4


WPScon¬g
WPScon¬g is a script ¬le that invokes con¬guration tasks. The con¬guration
tasks are implemented using the Apache Ant Tool, which is included as part
of WebSphere Application Server.
Apache Ant (http://ant.apache.org/index.html) is a Java-based
build tool whose functionality is extended using Java classes instead of
scripts, as for most other build tools. Ant™s build ¬les are written in XML.
They de¬ne the project and the tasks that need to be performed during
the con¬guration. Con¬guration values are passed as parameters during
invocation or through property ¬les.
Each build ¬le contains one or more projects. The project tag de¬nes the
name of the project, the default target to use when no target is supplied,
and optionally the base directory where all path calculations are done. Each
project has one or more target(s). A target is a set of tasks that need to be
executed. On the target you can specify the order in which a target gets
executed or a property that must be set (or not) for it to be executed.
A project can have a set of properties that are either set in the build ¬le
by the property task or can be set externally to Ant.
WPSCon¬g is invoked by typing the following:

* Unix: <wp_root>/config/WPSconfig.sh task_name [task_name...]
{-Dproperty =value]
* Windows: <wp_root>\config/WPSconfig.bat task_name
[task_name...] {-Dproperty =value]

task_name is the con¬guration task and -Dproperty is the property
¬‚ag that enables you to pass the property value to be used by the task.
Normally you would set the property values in WPSconfig.properties
rather than pass them as parameters. When a value is invoked from prop-
erty parameter, it temporarily supersedes the value set in WPSconfig
.properties but does not overwrite it. The precedence order (highest
to lowest) for setting properties is as follows:

1. Properties set on the command line
2. Properties set in parent properties ¬le
3. wpcon¬g.properties
4. WPScon¬g.xml

WPScon¬g script invokes the Ant build tool, which receives its project and
con¬guration task de¬nitions from WPSconfig.xml. WPScon¬g de¬nes
the con¬guration tasks you can invoke; see Table 4-1 for a description of
the tasks.
P1: GIG
WY009-04 WY009-BenNatan-v1.cls May 9, 2004 5:18




Customizing WebSphere Portal 67

Table 4-1 WebSphere Portal Con¬guration Tasks
TASK NAME DESCRIPTION
enable-security-ldap Con¬gures the WPS50 and WMM databases for
use with an LDAP directory. Sets WebSphere
Application Server security to use the LDAP
directory

database-transfer-export Exports existing data from Cloudscape

database-transfer-export-linux Exports existing data from Cloudscape on Linux

create-local-database-db2 Creates all the databases needed by WebSphere
Portal and WebSphere Portal content publishing
for a locally installed DB2 instance

database-transfer-import Imports data collected by the database-transfer-
export task

httpserver-con¬g Con¬gures WebSphere Portal for use with HTTP
server. The WpsHostPort value must be set ¬rst
in the wpconfig.properties ¬le



Con¬guration Templates
WebSphere Portal derives the values for the con¬guration tasks from the
wpconfig.properties ¬le. This ¬le contains a centralized reference for
all the con¬guration settings. However, this ¬le contains a large number
of properties, many of which the user does not need to change. To make
the property ¬le more workable, WebSphere Portal introduces the concept
of con¬guration templates, which are special-purpose property ¬les that
contain the properties for a speci¬c task.
Con¬guration templates is a parent property ¬le. A parent property ¬le
has values that when invoked supersede the same property value in the
wpconfig.properties ¬le. A parent property ¬le can also be a copy of
wpsconfig.properties with set values. This can be used to de¬ne a
common con¬guration over multiple machines.
In the <wp’ root>/config/helpers directory, WebSphere Portal pro-
vides con¬guration templates. See Table 4-2 for a description of these tem-
plates.
To use the con¬guration templates, copy the template from <wp_root>\
config\helpers to <wp_root>\config. Edit the ¬le and change the
property values to those that are appropriate to your environment (later
on we will expand this much further). In the template, above the value are
comments that go into great detail on what the value should be and what
the default value is. More often than not, the default value does not need
to be changed.
P1: GIG
WY009-04 WY009-BenNatan-v1.cls May 9, 2004 5:18




Table 4-2 WebSphere Portal Con¬guration Templates
CONFIGURATION TEMPLATE DESCRIPTION
Con¬gures WebSphere Portal to
transfer_db2.properties
use a DB2 database, including
transferring your data from
Cloudscape to DB2

Con¬gures WebSphere Portal to
transfer_informix.properties
use an Informix database,
including transferring your data
from Cloudscape to Informix

Con¬gures WebSphere Portal to
transfer_oracle.properties
use an Oracle database,
including transferring your data
from Cloudscape to Oracle

Con¬gures WebSphere Portal to
transfer_sqlserver.properties
use an SQL Server database,
including transferring your data
from Cloudscape to SQL Server

Con¬gures WebSphere Portal to
config_http.properties
use an external Web server,
instead of the internal HTTP
transport provided by
WebSphere Application Server

Con¬gures WebSphere Portal to
security_active_directory.properties
use WebSphere Application
Server security with Active
Directory as its Lightweight
Directory Access Protocol (LDAP)
directory

Disables security for WebSphere
security_disable.properties
Application Server if you have
previously con¬gured
WebSphere Portal to use security

Con¬gures WebSphere Portal to
security_domino.properties
use WebSphere Application
Server security with Domino as
its LDAP directory

Con¬gures WebSphere Portal to
security_ibm_dir_server.properties
use WebSphere Application
Server security with IBM
Directory Server as its LDAP
directory

Con¬gures WebSphere Portal to
security_sun_one.properties
use WebSphere Application
Server security with Sun ONE as
its LDAP directory




68
P1: GIG
WY009-04 WY009-BenNatan-v1.cls May 9, 2004 5:18




Customizing WebSphere Portal 69


After you have modi¬ed the con¬guration template, execute WPSCon¬g
passing the con¬guration template as a parent properties ¬le using the
following syntax:
* UNIX: ./WPSconfig.sh -
DparentProperties=<wp_root>/config/<configuration_template> -
DSaveParentProperties=true
*Windows: WPSconfig.bat -
DparentProperties=<wp_root>\config\<configuration_template> -
DSaveParentProperties=true

Note that when you call WPScon¬g, you are not specifying a task. When
you do not specify a task, the con¬guration program updates the
wpconfig.properties ¬le with values from the con¬guration template.
Of course, this happens if and only if the con¬guration tasks execute suc-
cessfully.
Of course, you do not have to use the con¬guration templates provided
by IBM. You can create your own. Just copy a con¬guration template that
matches as close as possible to the con¬guration you want to make and
modify the ¬le adhering to the conventions speci¬ed in the ¬le.


Using DB2 with WebSphere Portal
Now that you understand how WPScon¬g works, you need to know how
to modify the WebSphere Portal for a real-life scenario. In Figure 4-1, in
the DMZ, the WebSphere Portal is on Windows 2000 Advance Server on
sandbox1.rigorconsultants.com. In the secured zone, data is stored
on DB2 UDB 8.1 Enterprise database server. In this con¬guration, the data is
stored in a more robust database with features to support enterprise opera-
tion management, backup and recovery, performance turning, and change




Figure 4-1 WebSphere Portal using DB2 database on a separate server.
P1: GIG
WY009-04 WY009-BenNatan-v1.cls May 9, 2004 5:18




70 Chapter 4


management. Also by placing the database on its server, you can prevent
the application server from impacting the database server and vice versa.

Con¬guring the DB2 Server
The ¬rst step is to con¬gure the remote DB2 Server, which for the example
is sandbox2.rigoroconsultants.com. Assume the following:
You have installed DB2 UDB 8.1.
The database user wpsdbusr has been set up and has administrative
rights.
You are logged in as wpsdbusr.
Port 50000 and 50001 can access the client. This implies that the
¬rewalls are con¬gured to allow these ports.
A db2 instance is available with enough storage allocated for the
de¬ned databases.
Three databases need to be created: wps50, wpcp50, and fdbk50. The
database wps50 stores information about user customization and member
management. Size is dependent on the number of portal objects and users.
Database wpcp50 is used by the content publishing and the document man-
agement and the storage requirements are based on the number and size
of documents being published or stored. The last database fdbk50 is the
WPCP feedback database whose size is based on the site traf¬c.
Now you are ready to con¬gure your remote server. This is somewhat
complicated. Many of these commands are in the installation manual so a
good trick is to ¬nd the installation manual (wpf-install-ent) in pdf format
and copy and paste the commands from the manual to a command prompt.
The following are the steps to con¬gure the remote database:
1. Log in to the DB2 server as wpsdbusr.
2. Enter the following commands in a DB2 Command Window to set up
the WebSphere Portal database:
db2 create database wps50 using codeset UTF-8 territory us

<<

. 15
( 87 .)



>>