DB2 Linux installation
Installation procedure is similar regardless of edition, Express-C, Express Edition and Enterprise Edition have both graphical and command line installation available. I prefer command line based installation.
First of all you should download DB2 files from IBM web page. Current version of Express-C is 9.7.2. What ever edition you are downloading, make sure that it matches your architecture. If you have 64-bit architecture, then choose that one.
IMPORTANT. These instructions are for DB2 9.7 or 9.5 and Ubuntu 10.04. These instructions should work with older Ubuntu versions, also. However, if you are installing DB2 9.1 on Ubuntu 10.04, then read these notes. Installation of 9.1 is basically same, but you have to do certain extra things to cover 9.1's lack of SHA512 support.
UPDATE ! It has been confirmed that these instructions work on Ubuntu 10.10, also. However, these instructions may not work with DB 9.8 especially on 64 bit systems.
After download is complete, unpack the file and change into the created directory
tar -xvzf db2exc_972_LNX_x86.tar.gz
Now we are in directory expc, where all the binaries are. Actual installation must be done with root privileges. Before you start the installation you should run
which will tell you that libaio.so.1 is missing. Install the appropriate package with
sudo apt-get install libaio.so.1
In Ubuntu 9.10 and 10.04 it is also possible (depending on architecture and platform) that this check will complain of missing libstdc++.so.5 . You will not find it anymore in Ubuntu repositories. You can obtain the missing package from several sources, but take care that the package matches your architecture (x86, x64 etc).
Ubuntu x86 (32 bit)
If you have x86 (32 bit) architecture, then easiest way is to activate old Jaunty repository for a moment, install the package and then deactivate the added repository. In the /etc/apt/sources.list add line (replace uk with your local country code)
deb http://uk.archive.ubuntu.com/ubuntu jaunty main universe
Then synchronize repositories and install package
sudo apt-get update
sudo apt-get install libstdc++5
And then delete jaunty repository from /etc/apt/sources.list AND do sudo apt-get update again. Alternatively, you could also download the package directly from Jaunty repository and use dpkg.
Ubuntu x64 (64 bit)
If you are using x64 (64 bit) architecture, you will not get that easy, and you need both 32 bit and 64 bit versions. I will show two paths to achieve this goal
Path 1. You you have to download libstdc++5 amdx64 package, and then execute following steps
dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb
dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs
sudo cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/
sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
sudo dpkg -i libstdc++5_3.3.6-18_amd64.deb
dpkg --extract libstdc++5_3.3.6-18_i386.deb ./
cp libstdc++.so.5.0.7 /usr/lib32/
ln -s libstdc++.so.5.0.7 libstdc++.so.5
Now we should be ready to install DB2. Manual installation is started with
Installation program will ask for installation directory (just use the default). Installation takes a while, and if it is successful, you should get the message The Execution completed successfully. DB2 is now installed, but it is not yet ready for use. After this we continue with DB2 Linux Configuration.