Linux Notes: B2 Installation
- The information presented here is intended for educational use by qualified computer technologists.
- The information presented here is provided free of charge, as-is, with no warranty of any kind.
Edit: 2026-10-20
Installation
# ===================================================================
# title: db2-notes0.txt
# edit : 2026-10-19
# steps:
# 1) IBM instructs to do these commands as root (or sudo)
# 2) ./db2prereqcheck
# 3) ./db2_install -n -b /opt/ibm/db2/V12.1 -y -p SERVER
# 4) ./db2_install -n -b /opt/ibm/db2/V12.1 -y -p CLIENT
# ===================================================================
#
# step-01 (unpack files)
#
# unpack files (will create folder server_dec)
tar -xvf v12.1.5_linuxx64_server_dec.tar.gz
#
# step-02 (prep)
#
cd server_dec
# run dependancy check
./db2prereqcheck
#
# step-03 (install missing dependencies)
#
yum install ksh perl net-tools libstdc++.i686 pam.i686 libxcrypt-compat
#
#
# step-04 (server)
#
./db2_install -n -b /opt/ibm/db2/V12.1 -y -p SERVER
#
# step-05 (client - optional)
#
./db2_install -n -b /opt/ibm/db2/V12.1 -y -p CLIENT
#
# step-06 (create groups)
#
sudo groupadd db2iadm1
sudo groupadd db2fadm1
#
# step-07 (create users)
#
sudo useradd -g db2iadm1 -m -d /home/db2inst1 db2inst1
sudo useradd -g db2fadm1 -m -d /home/db2fenc1 db2fenc1
sudo passwd db2inst1
#
# step-08 (create a DB2 instance)
# FENCED USER INSTANCE NAME
# ----------- -------------
#sudo /opt/ibm/db2/V12.1/instance/db2icrt -u db2fenc1 db2inst1
sudo /opt/ibm/db2/V12.1/instance/db2icrt -nosharedgroup -u db2fenc1 db2inst1
#
# step-09 (list running instances)
#
sudo /opt/ibm/db2/V12.1/instance/db2ilist
#
# step-10 (stop DB2 instance)
#
sudo /opt/ibm/db2/V12.1/instance/db2idrop db2inst1
#
# step-11 (recreate a DB2 instance)
#
sudo /opt/ibm/db2/V12.1/instance/db2icrt -nosharedgroup -u db2fenc1 db2inst1
#
# step-12 (verify the installation)
#
su - db2inst1
db2start
#
# step-13 (setup the sample database)
#
db2sampl
#
# step-14 (test the sample database)
#
db2 connect to sample
db2 "select * from employee"
db2 connect reset
#
# ===================================================================

Back to
Home
Neil Rieck
Waterloo, Ontario, Canada.