How install DB2 on Centos Linux
To change the password for root user:
sudo passwd root
Download centos from https://www.centos.org/download/
Old centos versions is found here https://vault.centos.org/
Other Linux versions can be found here https://www.linuxlookup.com/linux_iso
Inside Linux, to find version of centos enter:
How activate X11:
yum upgrade libstdc++
yum install libstdc++.i686
yum install gcc-c++
yum –noplugins install pam-devel.i686
yum install libXtst.so.6
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.
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
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
Open firewall port in centos with command:
firewall-cmd –permanent –add-port=50000/tcp
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.
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. https://www.ibm.com/docs/en/license-metric-tool?topic=tool-step-1-installing-db2
Add a license file to extend your license.
- Go to the directory where you downloaded the license activator, and extract the package.
- From the directory with the extracted files, go to /db2/license.
- Copy the db2std_vpc.lic file to the home directory of the DB2 instance owner, by default /home/db2inst1.
- 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; https://www.dbvis.com/download/12.0
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.
If you want to install ILMT, you can download this files:
DB2 license activator:
Quick Start Guide: