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.
These installation notes are based on a single-partition installation using the 2.4.21–20 kernel (September 20, 2004).
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 |
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.
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
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.
The pdksh package is installed in a default setup (required for multiple-partition and high availability installations)
The IBMJava2-JRE-1.4.2 rpm package is also installed by default
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 |
Asynchronous I/O package (libaio) is also installed by default.
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 |
export LD_ASSUME_KERNEL="2.4.19" |
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.
These installation notes are based on the 2.4.21 kernel (SLES kernel on September 20, 2004)
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.
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. |
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.
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.
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.
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).
If you want to run a multiple-partition environment, you will need to install the pdksh package found on CD 4.
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. |
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.
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.
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.
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.
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.
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.
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.
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.
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. |
export DB2USELOCALJRE=TRUE export JAVA_HOME=/usr/java/jre1.5.0/ |
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 |
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/ |
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.
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.
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.
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.