This is for:
VirtualBox on Win10 + Ubuntu 18 + DB2 express-C 64-bit.
Headless setting takes too much effort, thus installed on Ubuntu 18 with GUI.
1. Download for LinuxRegister IBM ID when you download the file.
(1) First go here,
(2) Search for "express-c"https://www.ibm.com/search?lang=en&cc=us&q=express-c
And click on DB2 Express-C database server
(Or try this link, https://www-01.ibm.com/marketing/iwm/iwm/web/pickUrxNew.do?source=swg-db2expressc&mhsrc=ibmsearch_a&mhq=express-c)
I downloaded 64 bit, v11.1. File name is v11.1_linuxx64_expc.tar.gz
2. Install(1) Uncompress that file
$ tar zxvf v11.1_linuxx64_expc.tar.gz
(2) set up
$ cd expc
Check if all required dependencies are installed. If not, install them.
Then run installer
Takes a while, and will install at ~/sqllib
3. Set up, StartStart DB2:
And need to set up a couple of things. Run client:
3.1. Create sample database:
db2 => create database sample
DB20000I The CREATE DATABASE command completed successfully.
3.2. Set up port 50000:
db2 => UPDATE DBM CFG USING SVCENAME 50000
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
SQL1362W One or more of the parameters submitted for immediate modification
were not changed dynamically. Client changes will not be effective until the
next time the application is started or the TERMINATE command has been issued.
Server changes will not be effective until the next DB2START command.
3.3. Then set up TCP/IP
$ db2 get dbm cfg | grep SVCENAME
TCP/IP Service name (SVCENAME) =
SSL service name (SSL_SVCENAME) =
$ db2set DB2COMM=tcpip
$ db2set -all
To stop and start again and test
SQL1064N DB2STOP processing was successful.
$ db2 connect to sample user kkim using <password>
Other helpful commands, for diagnostic output:
4. JDBCMake sure the port is defined in /etc/services file, if not add the line:
# vi /etc/services
db2c_db2inst1 50000/tcp # db2
Get driver from one of these sites:
- From IBM, https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads
- Open Source version, http://jt400.sourceforge.net/