Installing DB2 Express C 9.7 on Ubuntu

1. Ubuntu Install

First step is to install Ubuntu server. We will use version 8.04 LTS, because this version is recommended and tested for DB2 version 9.7. LTS means Long Term Support and Ubuntu server 8.04LTS is maintained until April 2013. Projected end of support date for DB2 9.7 is Sept. 30, 2014.

2. Add required libraries

We need to install following packages: binutils, libaio1, libstdc++5, pdksh. Install them with following command on console or in terminal window:
sudo apt-get install binutils libaio1 libstdc++5 pdksh

You should get output similar to that:
Reading package lists... DoneBuilding dependency treeReading state information... Done
The following extra packages will be installed:
Suggested packages:
The following NEW packages will be installed:
binutils gcc-3.3-base libaio1 libstdc++5
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1918kB of archives.
After this operation, 8847kB of additional disk space will be used.
Do you want to continue [Y/n]?

3. Increasing kernel limits

Often overlooked part of DB2 installation is not setting kernel limits correctly. They are configured in /etc/sysctl.conf:

kernel.sem=250 256000 32 1024

minimal size of shmmax required by DB2 is 256MB, Optimal shmmax size is physical RAM size. msgnmi is not very clearly mentioned in IBM documentation but default value is just 16 and with that value you cant even connect two users to database.

For non-root instalations is also needed to increase number of files for user running db2 server. In /etc/security/limits.conf increase maxfiles to 65536:

db2username hard nofile 65536

After changing these files, activate new kernel configuration by sudo sysctl -p and re-login. Reboot is not needed.

4. Installing non-root db2

Fastest way to install DB2 as regular user is to run /db2_install Non root installations have some limitations. but they are great for testing, easy install or if you are lacking superuser access to system.

Non root installations can be enhanced with instance/db2rfe command (root access is required for running it). With this command you can optionally add some (but not all) features from root installation into your non-root installation.

Features are listed in configuration file instance/db2rfe.cfg. You need to edit file and set requested features to YES. Configuration file is commented, so be sure to read comments inside. Most important feature for db2 non root installs is ENABLE_OS_AUTHENTICATION. You need this if you want to allow other users to use your db2 instance.

Views: 4


You need to be a member of ChannelDB2 to add comments!

Join ChannelDB2

Featured Downloads

Try BLU Acceleration on Cloud

© 2020   Created by channeldb2.   Powered by

Badges  |  Report an Issue  |  Terms of Service