Chapter 2. Preparing Your System For Installation

This section addresses bringing the system online and preparing it to take on the WAF installation. When the system is ready, you can go directly to either of the installation methods.

Following this chapter are two overarching methods for installing WAF. The first is to download the source or binary RPMs and install everything manually. The second method is to use Red Hat Network, which will download, resolve dependencies and install the proper packages. For both approaches, the preparations to the server system are essentially the same. Some of the post-install configurations will be the same.

Once you are done with the preparations, you can go directly to either of the two install methods:

2.1. Installation Preparations

The items in this chapter must be installed and configured before installing WAF. It is assumed that anyone installing WAF is already familiar with the following prerequisite skills:

2.1.1. Installation Checklist

  1. Install the appropriate JDK for your system.

  2. Install the Relational Database Mangement System (RDBMS) you want to use. See Section 2.1.3 Oracle Configuration or Section 2.1.4 PostgreSQL Configuration.

  3. Install the servlet container of your choice.

  4. If you are developing on top of WAF, install Junit, HTTPUnit, JUnitPerf and Ant. See Section 2.1.2 Software Packages.

2.1.2. Software Packages

  • JDK 1.3.1 — on Red Hat Enterprise Linux, the IBM JDK is recommended and is available online at http://www.ibm.com/developerworks/java/jdk.

  • A RDBMS, either:

    • Oracle 8i or 9i, Standard Edition or Enterprise Edition

      NoteNote
       

      The interMedia search capability in the Standard Editions of Oracle is limited. If you want to use interMedia as your WAF search engine, we suggest Enterprise Edition.

      Oracle 9.2 — installation instructions for Linux are available online at http://otn.oracle.com/documentation/oracle9i.html.

      To access this information, you must first be a registered user to access at http://technet.oracle.com.

      At a minimum, you will need the Oracle client libraries (for UNIX®, this option is available during installation; on MS Windows® it is called the Oracle Windows Client) if you are connecting to a remote Oracle installation. If you do not have an Oracle installation, you will need to install the Oracle database as well.

    • PostgreSQL 7.3.x, available online at http://www.postgresql.org.

      NoteNote
       

      WAF 6.0 requires PostgreSQL 7.3.x. This is a change from previous versions of WAF, which required PostgreSQL 7.2.x. See the Web Application Framework 6.0 release notes for this and other upgrade information.

  • A servlet container that supports Servlet 2.3, such as Apache Tomcat 4.x, available online at http://jakarta.apache.org/tomcat/, or Resin 2.1.x, which is available at http://www.caucho.com.

If you intend on developing with WAF, you will also need:

RPMs for the above are available online at http://www.jpackage.org.

For more information see Chapter 7 Installing WAF for Development.

2.1.3. Oracle Configuration

2.1.3.1. Oracle Server

In order to install Web Application Framework with Oracle, the installation process needs a valid Oracle username and password. The user should have full privileges on the user's schema, which can be spread across one or more tablespaces. In addition, make sure your version of Oracle is configured as follows:

  • UTF-8 character set

  • Minimum 8KB db blocksize

  • Intermedia, if you need full-text search capabilities

2.1.3.2. Oracle Client

WarningWarning
 

Although you can install WAF with the Oracle Thin driver, there are some known issues with the way it handles LOBs. It is highly recommended that you use the OCI driver instead.

Most likely, the Oracle JDBC driver will be already in place at:

${ORACLE_HOME}/jdbc/lib/classes12.zip

This path is the default value offered by the Oracle installation program when configuring the location of the Oracle JDBC driver, if the Oracle client library is available and ORACLE_HOME is set accordingly. If this file does not exist, you must install it. You can download the drivers from http://technet.oracle.com; the classes12.zip included with the Solaris drivers works on Red Hat Enterprise Linux as well.

The OCI driver depends on native Oracle client libraries which must be properly set via LD_LIBRARY_PATH.

Make sure that the user running the servlet container has read access to the Oracle JDBC driver and client libraries.

To get the Thin JDBC driver to work, the target Oracle machine (for example, the one you are connecting to) must have its listener enabled for TCP connections, even if the WAF and Oracle installations are on the same host. If the OCI driver is an installed, you can use the OCI driver to eliminate the need for the TCP listener.

Install the Oracle 9i client according to the instructions provided by Oracle. For further reference, see the Oracle 9i installation hints for Red Hat Linux 7.2 online at http://www.idevelopment.info/data/DBA_tips/DBATIP_53.shtml.

A number of the commands for installation and day-to-day development assume that the Oracle environment has been setup for all users on the machine. This can be trivially accomplished by creating the file /etc/profile.d/oracle.sh as follows (you will need to correct the paths to match your local installation). A line break has been inserted for printing purposes; the "\" signifies where to reconnect the lines into one again:

export ORACLE_HOME=/u00/app/oracle/product/9.0.1
export NLS_LANG='AMERICAN_AMERICA.UTF8'
export PATH=$PATH:$ORACLE_HOME/bin
if [ -z $LD_LIBRARY_PATH ]
then
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
else
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:\
$ORACLE_HOME/ctx/lib
fi

NoteNote
 

If you are connecting to a local Oracle instance and you are not connecting via the listener, you must make sure ORACLE_SID is set in your environment as well. Normally this happens automatically during installation.

2.1.4. PostgreSQL Configuration

2.1.4.1. PostgreSQL Server

For detailed installation instructions, see http://www.postgresql.org/docs/7.3/static/installation.html.

Your PostgreSQL database server must listen via TCP/IP. To enable this, add the line tcpip_socket = true to the postgresql.conf of your database, which is usually /var/lib/pgsql/data/postgresql.conf.

When creating a database for use with WAF, there are two items that must be done. First, you need to declare that the database should encode information in the UNICODE setting. For more information, refer to http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/multibyte.html. Second, you must enable plpgsql for the database.

To create the database, you can execute the following:

createdb -h hostname -E UNICODE dbname
createlang -h hostname plpgsql dbname

Where hostname is the name of the host on which the database is running and dbname is the name of the database you want to create.

2.1.4.2. PostgreSQL Client

Web Application Framework 6.0 comes with its own PostgreSQL JDBC driver. Therefore, there is no other configuration necessary for this part.