Installing Db2 on Ubuntu

Last modified: December 3, 2019
You are here:

Installing Db2 on Ubuntu

Server pre-requisites

This article assumes that you will be using the latest Ubuntu LTS release being 18.04 LTS (Bionic Beaver). Make sure you install the 64-bit PC (AMD64) server install image. If you are just playing around with Db2 you can use a desktop image for productional use we advise a headless (no desk) version of Ubuntu. Installation can be done from the console (local) or SSH session (remote).

The Db2 Software

If your company has a Db2 license you normally download the software from IBM Passport Advantage. If you want to use the free Db2 Community edition then you can obtain your software from Just use the latest Fixpack from the release you want to install. Make sure you download the Linux 64-bit DB2 Universal Fix Pack for x86-64, AMD64 or Intel EM64T. Transfer the downloaded file, which has a name like vfp_linuxx64_server_t.tar.gz, to your home directory an untar the file.

tar -xzf vRR.MfpX_linuxx64_server_t.tar.gz

Although it is possible to install Db2 as non-root user we strongly recommend to to a root install, so in order to install you need to be a sudo user.

Installing the missing software

After the untar of the software go into the server_t directory

cd server_t

To verify is all software need is installed on the server issue:

sudo ./db2prereqcheck -l 

This will produce a report on missing software. You can safely ignore any reference to gcc, binutils, cpp, gcc-c++, and kernel-source if you don’t intend to use Db2 Purescale. They are needed only to compile the IBM General Parallel File System (GPFS) Portability Layer (GPL) module which is used by Db2’s Purescale feature.

Very likely you need to install some missing modules. Here is the common list for Ubuntu.

sudo apt-get install libx32stdc++6
sudo apt-get install libpam0g:i386
sudo apt-get install libaio1

Some Db2 tools use Java. The install process will check if the Java Runtime Engine (JRE) is installed and if not it will install a local copy for Db2. This is why db2prereqcheck does not report it as missing. But it is wise to have the JRE maintained by regular patch process so install it also:

sudo apt-get install default-jre

If you have downloaded a older release of Db2 (e.g. 10.5 in order to do some testing) it is possible the db2prereqcheck reports that only older Ubuntu releases are supported. In general you can ignore these messages. Many users have reported that no problems exist with Ubuntu 18.04 and older Db2 releases.

After you installed the missing software repeat the db2prereqcheck command again to make sure you are not missing anything

Installing Db2

If you intend to use Tivoli System Automation (TSA) then install this software before installing Db2.

Db2 offers two installation procedures:

  • db2setup which is a graphical setup. It is meant for a desktop environment. Often when you forward the X11 output to a SSH Client with built-in X-Server (e.g. MobaXterm) the setup process does not start or hangs in the middle of the install. We advise to use this command only in a desktop environment.
  • db2_install which is the console based procedure. In this article we will use this one.


sudo ./db2_install

The install process will go though x steps. If TSA is nor installed the install will always end with a warning. The install process will produce a log file in /tmp (see output messages). You can copy this file back to your home directory as installation documentation and reference for the future.

soon more on this topic….
Was this article helpful?
Dislike 0
Views: 2668