Fung's DBA World

Install DB2 in Linux

August 28, 2015

Install DB2 server in Linux may not as difficult as Oracle database server installation in Linux, it just need a little change to install DB2 server in Linux, espacially in silent mode. This post just a practice of my homework. And any suggestions will be welcome.

My test environment OS is RHEL6.5 X64, and DB2 version is v10.1. Since v9.7.2, the kernal parameters do not need to modify manually, as the database manager modifies kernal parameters dynamically when it starts. And not like Oracle, DB2 with response file installation no need to create account in OS, as you can specify users in the response file.

2. extract DB2 binary, and run prerecheck

Fix the warnings or errors until all requirements db2prereqcheck matched.

3. create the response file using the sample responses file

The sample response file located at server/db2/platform/samples/,

Edit the response file to meet your environment.

II. Install DB2 using respons file

1. Configure firewall for DB2 service port

You dont need to manual configure database manager parameter “scvename”, as the response file already did. What we need to do is opening the service port in firewall.

3. Create database

–Create sample database (optional)

–Create user defined database

4. Configure client connections

On the clients:
First, catalog node on clients:

Second, catalog database on clients:

In the output, where “Directory entry type” equals “remote”, it means from the database is on a remote server, oppositely, where the “Directory entry type” equals “indirect”, it means a local database.
Now, we can connect to the server in the client:

Something wrong with the client connection. And I found that the issue was firewall configure not correct. In RHEL6, in firewall configuration file /etc/sysconfig/iptables, if you need to open the other port, your configure command need to below 22 port. For example:

Try to reconnect:

5.Configure archive log using disk

DB2 offer 2 methods to manager transaction logs, circular and archive, most of production environment using archive log mode.

Change default circular log mode to archive log

After modifying the LOGARCHMETH1 parameter the database will need an offline full backup:

Manual archive a log, and check the archive whether works or not:

6.Configure incremental tracking mode

If you want to backup the database in the incremental or delta mode, the trackmod configuration parameter must be set to “ON”

After changing this parameter to “ON” you will also need to take a full backup (online or offline) to establish the baseline for incremental or delta backups.

EOF