CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

9. Installing DB2 Express-C on Fedora 7

Before proceeding, please ensure that you have read Section 5 and Section 6.

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

These installation notes are based on a single-partition 32-bit installation using the 2.6.21-1.3228.fc7 kernel.

9.1. Installation notes

The only installation error encountered was found when launching the ./db2setup command. The screen displayed this error:
ERROR:
    The following library files could not be loaded by db2langdir
    in /tmp/exp/disk1/db2/linux/install/../bin

        libstdc++.so.5
        libstdc++.so.5
        
    Check the following web site for the up-to-date system
    requirements of IBM DB2 Version 9.1:
        http://www.ibm.com/software/data/db2/udb/sysreqs.html

    Aborting the current installation ...
To resolve this error, use the yum package utility to install the necessary C++ compatibility libraries:
yum -y install compat-libstdc++-33
Installation succeeded after installing the C++ libraries.

9.2. Post-installation notes

Basic test results (see Section 21 for more details) were successful.

However, I found that after a reboot, the DB2 instance was not being restarted automatically, so clients could not connect to the database. To correct this problem, execute this command as the instance owner:
db2set DB2AUTOSTART=YES
This will ensure that the DB2 instance is initialized and ready to receive incoming connections after a reboot (intentional or otherwise).

Also, to allow DB2 access through the iptables-based firewall (which is enabled by default), it was necessary to modify the iptables firewall ruleset, which is kept in the /etc/sysconfig/iptables file. If you have enabled your firewall (using the iptables service), and you want to enable external connectivity to your DB2 server, you must open up TCP and UDP access to ports 523 and TCP access to any DB2 service ports. To make this work, add these rules to the iptablesfile (anywhere amongst the -j ACCEPT rules):
-A RH-Firewall-1-INPUT -p udp -m udp --dport 523 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 523 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 50000 -j ACCEPT
These rules were added directly to the iptables file to ensure that they persist in case of a system reboot. Note that you will need to add another new TCP rule to allow firewall access if you create any additional instances later.

You can use db2 get dbm cfg | grep SVCENAME to retrieve the service names and then check the /etc/services for the equivalent port values to open on your firewall.