Installing IBM Db2 11.5 on Red Hat.
In this article we are installing IBM Db2 on Red Hat linux.
We can download Db2 from here - A free IBM account is required to download Db2 software.
Once we've downloaded the software from the IBM website and uploaded to the Red Hat VM.
root@redhat:/root>
$ ls -lrt
-rw-r--r--. 1 root root 2083458415 v11.5.6_linuxx64_server_dec.tar.gz
We can create an user called db2inst1 and a group called dba
root@redhat:/root>
$ useradd -d /home/db2inst1 -g dba -s /bin/bash db2inst1
We unzip and extract all Db2 installation files
root@redhat:/root>
$ gunzip v11.5.6_linuxx64_server_dec.tar.gz
root@redhat:/root>
$ tar xf v11.5.6_linuxx64_server_dec.tar
so a new folder called server_dec is created
root@redhat:/root>
$ cd server_dec/
root@redhat:/root/server_dec>
$ ls -lrt
total 84
-r-xr-xr-x. 1 bin bin 5059 Jun 11 2021 db2prereqcheck
-r-xr-xr-x. 1 bin bin 5059 Jun 11 2021 db2setup
-r-xr-xr-x. 1 bin bin 5041 Jun 11 2021 db2ls
-r-xr-xr-x. 1 bin bin 5207 Jun 11 2021 db2_deinstall
-r--r--r--. 1 bin bin 16808 Jun 11 2021 db2checkCOL.tar.gz
-r--r--r--. 1 bin bin 4987 Jun 11 2021 db2checkCOL_readme.txt
-r-xr-xr-x. 1 bin bin 5077 Jun 11 2021 db2_install
-r-xr-xr-x. 1 bin bin 5254 Jun 11 2021 db2ckupgrade
-r-xr-xr-x. 1 bin bin 5095 Jun 11 2021 installFixPack
drwxr-xr-x. 6 bin bin 134 Jun 11 2021 db2
root@redhat:/root/server_dec>
If we execute the pre-req script db2prereqcheck, we will see many warnings, therefore, the following will have to be executed in order to install the prerequisites.
root@redhat:/root/server_dec>
$ yum install pam.i686
root@redhat:/root/server_dec>
yum update -y libstdc++.x86_64
root@redhat:/root/server_dec>
$ yum install gcc patch make perl python2 m4 cpp kernel-devel kernel-headers gcc-c++
Somes warnings can be ignored since this is not a production server and we won't use TSA nor purescale.
Validating "SELinux status " ...
SELinux is "enabled ".
DBT3563E The db2prereqcheck utility determined that SELinux is enabled, which is not supported with GPFS.
ERROR : Requirement not matched.
Validating "prereqSAM" ...
DBT3613E The db2prereqcheck utility failed to verify the prerequisites for TSA. Ensure your machine meets all the TSA installation prerequisites.
ERROR : Requirement not matched.
Once all dependencies are installed, we can execute the db2_install command.
root@redhat:/root/server_dec>
$ ./db2_install
Read the license agreement file in the db2/license directory.
***********************************************************
To accept those terms, enter "yes". Otherwise, enter "no" to cancel the install process. [yes/no]
yes
Default directory for installation of products - /opt/ibm/db2/V11.5
***********************************************************
Install into default directory (/opt/ibm/db2/V11.5) ? [yes/no]
yes
Specify one of the following keywords to install DB2 products.
SERVER
CONSV
CLIENT
RTCL
Enter "help" to redisplay product names.
Enter "quit" to exit.
***********************************************************
SERVER
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no]
no
DB2 installation is being initialized.
Total number of tasks to be performed: 59
Total estimated time for all tasks to be performed: 2775 second(s)
Task #1 start
Description: Checking license agreement acceptance
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Base Client Support for installation with root privileges
Estimated time 3 second(s)
Task #2 end
Task #3 start
Description: Product Messages - English
Estimated time 14 second(s)
Task #3 end
Task #4 start
Description: Base client support
Estimated time 355 second(s)
Task #4 end
Task #5 start
Description: Java Runtime Support
Estimated time 217 second(s)
Task #5 end
Task #6 start
Description: Java Help (HTML) - English
Estimated time 7 second(s)
Task #6 end
Task #7 start
Description: Base server support for installation with root privileges
Estimated time 6 second(s)
Task #7 end
Task #8 start
Description: Global Secure ToolKit
Estimated time 76 second(s)
Task #8 end
Task #9 start
Description: Java support
Estimated time 11 second(s)
Task #9 end
Task #10 start
Description: SQL procedures
Estimated time 3 second(s)
Task #10 end
Task #11 start
Description: ICU Utilities
Estimated time 59 second(s)
Task #11 end
Task #12 start
Description: Java Common files
Estimated time 18 second(s)
Task #12 end
Task #13 start
Description: Base server support
Estimated time 582 second(s)
Task #13 end
Task #14 start
Description: Control Center Help (HTML) - English
Estimated time 13 second(s)
Task #14 end
Task #15 start
Description: Relational wrappers common
Estimated time 3 second(s)
Task #15 end
Task #16 start
Description: DB2 data source support
Estimated time 6 second(s)
Task #16 end
Task #17 start
Description: ODBC data source support
Estimated time 260 second(s)
Task #17 end
Task #18 start
Description: Teradata data source support
Estimated time 3 second(s)
Task #18 end
Task #19 start
Description: Spatial Extender server support
Estimated time 21 second(s)
Task #19 end
Task #20 start
Description: Scientific Data Sources
Estimated time 5 second(s)
Task #20 end
Task #21 start
Description: JDBC data source support
Estimated time 200 second(s)
Task #21 end
Task #22 start
Description: IBM Software Development Kit (SDK) for Java(TM)
Estimated time 49 second(s)
Task #22 end
Task #23 start
Description: DB2 LDAP support
Estimated time 4 second(s)
Task #23 end
Task #24 start
Description: DB2 Instance Setup wizard
Estimated time 23 second(s)
Task #24 end
Task #25 start
Description: Structured file data sources
Estimated time 5 second(s)
Task #25 end
Task #26 start
Description: Integrated Flash Copy Support
Estimated time 3 second(s)
Task #26 end
Task #27 start
Description: Oracle data source support
Estimated time 4 second(s)
Task #27 end
Task #28 start
Description: Connect support
Estimated time 3 second(s)
Task #28 end
Task #29 start
Description: Application data sources
Estimated time 4 second(s)
Task #29 end
Task #30 start
Description: Spatial Extender client
Estimated time 3 second(s)
Task #30 end
Task #31 start
Description: SQL Server data source support
Estimated time 4 second(s)
Task #31 end
Task #32 start
Description: Communication support - TCP/IP
Estimated time 3 second(s)
Task #32 end
Task #33 start
Description: Tivoli SA MP
Estimated time 300 second(s)
Task #33 end
Task #34 start
Description: Base application development tools
Estimated time 36 second(s)
Task #34 end
Task #35 start
Description: Parallel Extension
Estimated time 3 second(s)
Task #35 end
Task #36 start
Description: EnterpriseDB code
Estimated time 3 second(s)
Task #36 end
Task #37 start
Description: Replication tools
Estimated time 60 second(s)
Task #37 end
Task #38 start
Description: Sample database source
Estimated time 4 second(s)
Task #38 end
Task #39 start
Description: itlm
Estimated time 3 second(s)
Task #39 end
Task #40 start
Description: DB2 Text Search
Estimated time 107 second(s)
Task #40 end
Task #41 start
Description: Command Line Processor Plus
Estimated time 8 second(s)
Task #41 end
Task #42 start
Description: Sybase data source support
Estimated time 3 second(s)
Task #42 end
Task #43 start
Description: Informix data source support
Estimated time 4 second(s)
Task #43 end
Task #44 start
Description: Federated Data Access Support
Estimated time 3 second(s)
Task #44 end
Task #45 start
Description: First Steps
Estimated time 3 second(s)
Task #45 end
Task #46 start
Description: Pacemaker
Estimated time 100 second(s)
Task #46 end
Task #47 start
Description: Product Signature for DB2 Server Edition
Estimated time 6 second(s)
Task #47 end
Task #48 start
Description: Guardium Installation Manager Client
Estimated time 36 second(s)
Task #48 end
Task #49 start
Description: Setting DB2 library path
Estimated time 180 second(s)
Task #50 start
Description: Installing or updating DB2 HA scripts for IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP)
Estimated time 40 second(s)
Task #50 end
Task #51 start
Description: Installing or updating Db2 resource agent scripts for Pacemaker
Estimated time 20 second(s)
Task #51 end
Task #52 start
Description: Executing control tasks
Estimated time 20 second(s)
Task #52 end
Task #53 start
Description: Updating global registry
Estimated time 20 second(s)
Task #53 end
Task #54 start
Description: Starting DB2 Fault Monitor
Estimated time 10 second(s)
Task #54 end
Task #55 start
Description: Updating the db2ls and db2greg link
Estimated time 1 second(s)
Task #55 end
Task #56 start
Description: Registering DB2 licenses
Estimated time 5 second(s)
Task #56 end
Task #57 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #57 end
Task #58 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #58 end
Task #59 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #59 end
The execution completed with warnings.
For more information see the DB2 installation log at
"/tmp/db2_install.log.210784".
We can now check the db2level
root@redhat:/opt/ibm/db2/V11.5/install>
$ ./db2ls
Install Path Level
/opt/ibm/db2/V11.5 11.5.6.0
and the license.
root@redhat:/opt/ibm/db2/V11.5/adm>
$ ./db2licm -l
Product name: "DB2 Community Edition"
License type: "Community"
Expiry date: "Permanent"
Product identifier: "db2dec"
Version information: "11.5"
Max amount of memory (GB): "16"
Max number of cores: "4"
Features:
IBM DB2 Performance Management Offering: "Not licensed"
Creating the Db2 instance.
root@redhat:/opt/ibm/db2/V11.5/instance>
$ ./db2icrt -u db2inst1 db2inst1
DBI1446I The db2icrt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2icrt.log.249916".
DBI1070I Program db2icrt completed successfully.
As the newly created user db2inst1.
root@redhat:/opt/ibm/db2/V11.5/instance>
$ su - db2inst1
Last login: Mon Feb 21 10:54:14 GMT 2022 on pts/0
[db2inst1@localhost ~]$ db2level
DB21085I This instance or install (instance name, where applicable:
"db2inst1") uses "64" bits and DB2 code release "SQL11056" with level
identifier "0607010F".
Informational tokens are "DB2 v11.5.6.0", "s2106111000", "DYN2106111000AMD64",
and Fix Pack "0".
Product is installed at "/opt/ibm/db2/V11.5".
[db2inst1@localhost ~]$ db2licm -l
Product name: "DB2 Community Edition"
License type: "Community"
Expiry date: "Permanent"
Product identifier: "db2dec"
Version information: "11.5"
Max amount of memory (GB): "16"
Max number of cores: "4"
Features:
IBM DB2 Performance Management Offering: "Not licensed"
Starting the Db2 instance
[db2inst1@localhost ~]$ db2start
02/21/2022 10:54:57 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
Creating the sample database
[db2inst1@localhost ~]$ db2sampl
Creating database "SAMPLE"...
Connecting to database "SAMPLE"...
Creating tables and data in schema "DB2INST1"...
Creating tables with XML columns and XML data in schema "DB2INST1"...
'db2sampl' processing complete.
Connecting to the Db2 database
[db2inst1@localhost ~]$ db2 connect to sample
Database Connection Information
Database server = DB2/LINUXX8664 11.5.6.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
[db2inst1@localhost ~]$