Install DB2 on linux



How install DB2 on Centos Linux

Suggested Solution:

To change the password for root user:
sudo passwd root

Download centos from

Old centos versions is found here

Other Linux versions can be found here

Inside Linux, to find version of centos enter:

cat  /etc/centos-release


How activate X11:

How configure X11 Forwarding in CentOS/RHEL 6/7

yum upgrade libstdc++

yum install libstdc++.i686

yum install gcc-c++

yum –noplugins install pam-devel.i686

yum install

yum install libXtst.x86_64

On your laptop where you run Xming before you start putty, add the Linux server ip address in the file C:\Program Files (x86)\Xming\X0.hosts to make X11 work.


Create folder

mkdir setup

mkdir ibm

Enter df -h to see free space on Linux.

Enter ln -s /home/ibm /ibm to create a softlink from /home/ibm to /ibm


How setup DB2

Copy the DB2_Svr_11.5_Linux_x86-64.tar.gz file to /ibm folder on your Linux server with WinSCP.

Expand the file with command:

tar  xvzf  v11.5.5_linuxx64_server_dec.tar.gz

Enter cd server_dec  to go to the correct folder and then start installation with command


Click new install

Click Next

Change the folder to install and click next

Enter the password and select the correct folder, then press next

Enter the password and then press next

Press Finish

Click Finish

Open firewall port in centos with command:

firewall-cmd –permanent –add-port=50000/tcp

firewall-cmd –reload

Change to user db2inst1 to be able to work with the database

su – dbinst1

Enter DB2 to get into the database, and enter CREATE DATABASE books, to create a database.

Db2 Tutorial

Enter db2 list db directory to see the databases created.

You need to download a license file to db2 folder license, to be able to use all CPU and RAM in the server.

Add a license file to extend your license.

  1. Go to the directory where you downloaded the license activator, and extract the package.
  2. From the directory with the extracted files, go to /db2/license.
  3. Copy the db2std_vpc.lic file to the home directory of the DB2 instance owner, by default /home/db2inst1.
  4. Open the terminal and switch the user to the DB2 instance owner.
    su - db2inst1

Add the license file to your installation.

db2licm -a db2std_vpc.lic

You can install a db-tool on your laptop to have a GUI to work with the database on the Linux server;

To setup ILMT see the documentation

If you get the error Unexpected Throwable caught: null. ERRORCODE=-4228, SQLSTATE=null. then the database schema maybe is not created or misspelled.

More information:

If you want to install ILMT, you can download this files:

All-in-One installer:
BigFix installer:
DB2 installer:
DB2 license activator:
Quick Start Guide:

How configure X11 Forwarding in CentOS/RHEL 6/7