DEV Community

Cover image for COBOL Tutorial Series: Install the DB2 on Windows/Linux - Session 6
Duc Nguyen Thanh
Duc Nguyen Thanh Subscriber

Posted on

COBOL Tutorial Series: Install the DB2 on Windows/Linux - Session 6

Hello

I'm Duke and I come back.

IBM DB2 is a family of data management products, including database servers, developed by IBM. It provides a relational database management system (RDBMS) that supports both structured and unstructured data. DB2 is designed to handle large volumes of data and offers features like high availability, scalability, and advanced data security.

Today I will show you how to install the DB2 Community Edition Docker image on Linux systems

1.Download Docker Desktop for Ubuntu here

2.Install Docker Desktop on Ubuntu here

3.Pull the DB2 image

sudo docker pull icr.io/db2_community/db2
Enter fullscreen mode Exit fullscreen mode

DB2 image

4.Create an environment variables file: vi .env_list

LICENSE=accept
DB2INSTANCE=db2inst1
DB2INST1_PASSWORD=password
DBNAME=testdb
BLU=false
ENABLE_ORACLE_COMPATIBILITY=false
UPDATEAVAIL=NO
TO_CREATE_SAMPLEDB=false
REPODB=false
IS_OSXFS=false
PERSISTENT_HOME=true
HADR_ENABLED=false
ETCD_ENDPOINT=
ETCD_USERNAME=
ETCD_PASSWORD=
Enter fullscreen mode Exit fullscreen mode

5.Create and run the container

sudo docker run -h db2server --name db2server --restart=always --detach --privileged=true -p 50000:50000 --env-file .env_list -v /Docker:/database icr.io/db2_community/db2
Enter fullscreen mode Exit fullscreen mode

Run the container

Tada, you can use the Db2Client or DBeaver to connect it right now

DBeaver

Top comments (2)

Collapse
 
bofcarbon1 profile image
Brian Quinn •

Very nice. Got DB2 Community up and running using Ubuntu 24.0.4. Time to build some tables and load some data. Then use it in COBOL. More than 17 years since I did that back on mainframes and Microsofucs COBOL. This time around gnuCOBOL. Should be fun and this time I am the DBA.

Collapse
 
ngtduc693 profile image
Duc Nguyen Thanh •

thanks