5. Distribution Specific Considerations

In this part of the HOWTO, we will cover any tweaks, fixes or requirements that need to be made to get DB2 UDB running on specific Linux distributions.

5.1. Red Hat Enterprise Linux (RHEL) 3

These installation notes are based on a single-partition installation using the 2.4.21–20 kernel (September 20, 2004).

5.1.1. Pre-installation notes

The pdksh package required for a multiple-partition environment setup is installed by default on Red Hat Enterprise Linux 3.

RHEL 3 has backported the asynchronous I/O kernel capabilities of the 2.6 kernel into their 2.4 kernel, but you will need to download and install the libaio RPM package to take advantage of this.

To check for the pdksh or libaio RPM packages, run the commands:
rpm -qi pdksh
rpm -qi libaio
If either package needs to be installed, you can add it to your system with the Red Hat up2date utility (this requires registration for a Red Hat Network account). Just run:
up2date pdksh
up2date libaio

No Java package is installed by default, so there are no conflicts with the Java 2 SDK from IBM that DB2 UDB installs.

5.1.2. Installation notes

The installation on Red Hat Enterprise Linux 3 completed successfully, with no problems getting the GUI tools or installer working, and no errors during the install. This smooth installation isn't surprising, given that RHEL 3 is an officially supported platform for Version 8.2

5.1.3. Post-installation notes

Initialize the Asynchronous I/O so DB2 UDB can take advantage of this new kernel feature. As the instance owner:
db2set DB2LINUXAIO=TRUE

5.2. SuSE Linux Enterprise (SLES) 9

SuSE Linux Enterprise Server 9 was released in August 2004 to great anticipation. It is currently the only Enterprise level Linux distribution certified by DB2 UDB that runs on the 2.6 kernel by default.

These notes are based on the 2.6.5-7 kernel (the SuSE Linux kernel update as of September 10, 2004), and installing a single-partition environment.

5.2.1. Pre-installation notes

  1. The pdksh package is installed in a default setup (required for multiple-partition and high availability installations)

  2. The IBMJava2-JRE-1.4.2 rpm package is also installed by default

  3. The kernel parameters (ipcs -l) before DB2 UDB installation:
    
        max number of segments:         4096
            max segsize:                    32768
            max number of arrays:           128
            max queues system wide:         16
            default max size of queue:      16384

  4. Asynchronous I/O package (libaio) is also installed by default.

5.2.2. Installation Notes

I received an error during start up of the db2setup utility:
/db2/ese/db2/linux/install/db2jinst:
line 131: 3474 Segmentation fault
$JAVA_PATH/$JAVA_INTERPRETER $JAVA_OPTIONS \
    -cp $JAVA_CLASSPATH $DB2SetupRun "$@" 2>/tmp/db2setup.err.running
The solution here is to run
export LD_ASSUME_KERNEL="2.4.19"
from the terminal where you launched the db2setup utility, then run db2setup again. This change will only affect the Java installer, not the kernel performance.

5.2.3. Post-installation notes

The kernel parameters (ipcs -l) after installation look like:

        max number of segments:         4096
        max segsize:                    262144 (updated)
        max number of arrays:           1024 (updated)
        max queues system wide:         1024 (updated)
        default max size of queue:      16384

Initialize the Asynchronous I/O so DB2 UDB can take advantage of this new kernel feature. As the instance owner:
db2set DB2LINUXAIO=TRUE

Optional: update the DB2 UDB JDK_PATH parameter so DB2 UDB uses SLES's installed Java 2 package. As the instance owner:
db2 update dbm cfg using JDK_PATH /opt/IBMJava2-142

Surprisingly, my installation didn't have Mozilla installed by default. To have the DB2 UDB help display properly, Mozilla should be installed using YaST.

5.3. SuSE Linux Enterprise (SLES) 8

These installation notes are based on the 2.4.21 kernel (SLES kernel on September 20, 2004)

5.3.1. Pre-installation notes

The pdksh package is installed in the default setup (required for multiple-partition and high availability installations).

Also, SLES 8 installs the IBMJava2–SDK-1.3.1 rpm package in a typical installation.

5.3.2. Installation notes

SuSE Linux Professional installs its own 1.3.1 Java JRE by default (the "IBMJava2-SDK-1.3.1" rpm package). During the DB2 UDB installation, this will cause a warning to be generated:
Command to be run: "/bin/rpm -ivh \
    '/mnt/cdrom/db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0'.i386.rpm"
Warning: there may be a version of this package already installed.
Since this package was supplied by SuSE Linux, it will have been installed into a different directory tree than the JDK from IBM that DB2 UDB installs. Therefore, there are 3 options you can choose to deal with this issue:

  1. Uninstall the Java2-1.3.1 package before installing, using either the YaST tool, or with the command line rpm -e IBMJava2-SDK-1.3.1 command. After installation, this will leave the IBMJava2–SDK–1.4.1 package as the only Java installation on the system.

  2. Leave both Java packages installed. By default, DB2 UDB will use the 1.4.1 JRE that it installs. The fact that SuSE Linux's Java package installs to a different directory means that the two packages will not conflict.

  3. Remove the IBM package (either with YaST or with rpm -e IBMJava2-SDK-1.4.1) after the installation completes. Update the DB2 UDB JDK_PATH configuration parameter to use the package installed by SuSE Linux:
    db2 update dbm cfg using JDK_PATH /usr/lib/java

Other than that one minor issue, DB2 UDB installed cleanly and setup was problem free.

5.4. SuSE Linux Professional 9.1

Note that IBM does not officially support this distribution for DB2 UDB V8.2. Any problems you encounter using this distribution must be replicated on a supported distribution before IBM Support will help you resolve the issue.

These notes are based on a single-partition installation on the 2.4.21 kernel (September 20, 2004).

5.4.1. Pre-installation notes

If you want to run a multiple-partition environment, you will need to install the pdksh package found on CD 4.

5.4.2. Installation notes

SuSE Linux Professional installs its own 1.4.2 Java JRE by default (the "java2–jre-1.4.2" package). During the DB2 UDB installation, this will cause a warning to be generated:
Command to be run: "/bin/rpm -ivh \
    '/mnt/cdrom/db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0'.i386.rpm"
Warning: there may be a version of this package already installed.
Since this package was supplied by SuSE Linux, it will have been installed into a different directory tree than the JDK from IBM that DB2 UDB installs. Therefore, there are 3 options you can choose to deal with this issue:

  1. Uninstall the java2–jre–1.4.2 package before installing, using either the YaST tool, or with command line rpm erase command. This will leave the IBMJava2–SDK package as the only Java installation on the system.

  2. Leave both Java packages installed. By default, DB2 UDB will use the 1.4.1 JRE that it installs. The fact that SuSE Linux's Java package installs to a different directory means that the two packages will not conflict.

  3. Remove the IBM package (either with YaST or with rpm -e IBMJava2-SDK) after the installation completes. Update the DB2 UDB JDK_PATH configuration parameter to use the package installed by SuSE Linux:
    db2 update dbm cfg using JDK_PATH /usr/lib/java

Other than that one minor issue, DB2 UDB installed cleanly and setup was problem free.

5.5. SuSE Linux Personal 9.1

Note that IBM does not officially support this distribution for DB2 UDB V8.2. Any problems you encounter using this distribution must be replicated on a supported distribution before IBM Support will help you resolve the issue.

These notes are based on the 2.6.4-52-default kernel and installing to a single-partition environment.

5.5.1. Pre-installation notes

The pdksh package is not installed by default. If you want to install a multiple-partition environment on SuSE Linux Personal, you will have to install.

The installer may complain about being unable to use the SMTP server even though postfix is installed and sendmail is available in the path. Make sure that postfix has been started before installation.

5.5.2. Installation notes

The usual trick of adding an xhost entry for localhost and then exporting the DISPLAY=localhost:0 when installing (so that the graphical utilities are displayed on a non-root user's desktop) didn't seem to work here. Instead, try executing ssh -X root@localhost and launch the utilities from there.

5.6. Fedora Core 2

Note that IBM does not officially support this distribution for DB2 UDB V8.2. Any problems you encounter using this distribution must be replicated on a supported distribution before IBM Support will help you resolve the issue.

Fedora Core 2 is a release of the Fedora Project (the Red-Hat-sponsored and community-supported open source project). The Fedora Project is a source for new technologies and enhancements that may be incorporated into Red Hat Enterprise Linux (RHEL) in the future.

These notes are based on both the default 2.6.5-1 and the update 2.6.8-1 kernels (the Fedora Core 2 kernel update on September 13, 2004 was 2.6.8-1), and installing to a single-partition environment.

5.6.1. Pre-installation notes

The kernel parameters (ipcs -l) before DB2 UDB installation:

	max number of segments:             4096
        max segsize:                        32768
        max number of arrays:               128
        max queues system wide:             16
        default max size of queue:          16384

The asynchronous I/O package (libaio) is also required to take advantage of the 2.6 kernel improvements. Install the libaio package from the Fedora Core CD.

5.6.2. Install Notes

The default 2.6.5 kernel had no installation issues with the db2setup GUI installer.

On the 2.6.8 kernel, however, I received an error when running the db2setup utility (the error may not display to the terminal; instead, if the db2setup command seems to fail without error, check the /tmp/db2setup.err file) :
JVMDG080: Cannot find class com/ibm/jvm/Trace
JVMXM012: Error occurred in diagnostics initialization(2)
Could not create the Java virtual machine.
The workaround for this error is to install Sun's Java 2 Platform Standard Edition 5.0 RC (Fedora Core 2 doesn't install a Java package by default). The rpm file is available from http://java.sun.com/j2se/1.5.0/download.jsp. After installing Java, set the environment variables in the terminal where you execute the db2setup utility:
export DB2USELOCALJRE=TRUE
export JAVA_HOME=/usr/java/jre1.5.0/
/usr/java/jre1.5.0/ is the location where Java is installed by default in the rpm from Sun.

The last step to making this work – and this is very important – is to add in a link named "jre" in Sun's Java folder so that db2setup works properly with the directory:
cd /usr/java/jre1.5.0/
mkdir jre
cd jre
ln -s ../bin bin

After making these changes, the db2setup GUI installer works properly.

Alternatively, you can avoid the Java-based problems by installing on Fedora Core 2 using
./db2setup -r db2ese.rsp
where db2ese.rsp is a slightly modified response file (the sample response files are found in the "db2/linux/samples/ directory)

5.6.3. Post-installation notes

The kernel parameters (ipcs -l) after installation look like:

        max number of segments:         4096
        max segsize:                    262144 (updated)
        max number of arrays:           1024 (updated)
        max queues system wide:         1024 (updated)
        default max size of queue:      16384

Initialize the Asynchronous I/O so DB2 UDB can take advantage of this new kernel feature. As the instance owner, run:
db2set DB2LINUXAIO=TRUE

For the GUI tools (DB2 UDB Control Center, DB2 UDB Configuration Assistant, DB2 UDB First Steps) to work properly under the 2.6.8-1 kernel, you'll need to tell DB2 UDB to use the Sun JRE. As the instance owner, execute this command:
db2 update dbm cfg using JDK_PATH /usr/java/jre1.5.0/
With that update, the DB2 UDB Java-based tools will work properly.

5.7. Mandrake Linux 10.1 (Community)

Note that IBM does not officially support this distribution for DB2 UDB V8.2. Any problems you encounter using this distribution must be replicated on a supported distribution before IBM Support will help you resolve the issue.

These notes are based on the 2.6.8.1–16mdk kernel and installing to a single-partition environment.

5.7.1. Pre-installation notes

The pdksh package is not installed by default. If you want to install a multiple-partition environment on Mandrake Linux, you will have to install it using drakconf (it's on CD3). Also, no Java package is installed by default, so we don't have to worry about any conflicts arising from that.

5.7.2. Installation notes

The GUI based installation went smoothly, with no reported problems or issues. If you do experience a hang with the Java installer, try the Sun Java workaround described in the Fedora Core 2 section.

5.7.3. Post-installation notes

Be careful of the Mandrake Linux security "msec" utility – it can mess up DB2 UDB functionality by changing world readable directories (like /home/db2inst1/sqllib/) that are necessary to run DB2 UDB to non-world readable. If you find that DB2 UDB is not working properly, investigate your security settings.