Saturday, 17 March 2012

Installing DB2 UDB 9.7 on CentOS Linux 6.2

More notes from the field ....

This time I'm installing DB2 UDB as a precursor for an IBM Connections and WebSphere Portal deployment.

I've unpacked DB2 as follows: -

$ cd /tmp
$ tar xvf /media/LenovoExternal/Products/DB297/db297linux64.tar

and then commenced the installation: -

$ ./db2setup

   The 32 bit library file is not found on the system.
   32-bit applications may be affected. 
DBI1190I  db2setup is preparing the DB2 Setup wizard which will guide
      you through the program setup process. Please wait.

Noting the WARNING re libstdc++, I've opened a new terminal window, and run: -

$ yum install

which ties up with my other experiences of IBM software on CentOS: -

Other than that, the DB2 installation has completed successfully.

I've then "logged in" as the DB2 instance owner - db2inst1: -

$ su - db2inst1

and attempted to create the sample database: -

$ db2sampl

  Creating database "SAMPLE"...
  Attempt to create the database "SAMPLE" failed.
  SQL0970N  The system attempted to write to a read-only file.  SQLSTATE=55009

  'db2sampl' processing complete.

Again I've seen this before: -

As before, look at the permissions for /tmp: -

$ ls -al /

drwxrwxr-x.  17 185101 330209  4096 Mar 17 04:24 tmp

and then change them: -

$ chmod 777 /tmp

Look again ...

$ ls -al /

drwxrwxrwx.  18 185101 330209  4096 Mar 17 04:25 tmp

$ 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.

Job done :-)


Ignacio de Córdoba said...

I'm trying to install db2 9.7 into CentOS 6.2 but get an error saying "This launchpad is not intended to run on the current platform..."
Do you know how I can make db2 installer ignore platform information and continue with installation just a you did?


Dave Hay said...

@Ignacio - interesting,the Launchpad runs OK for me on CentOS 6.2.

I'm also using DB2 UDB 9.7 and execute the Launchpad via this script: -

-rwxrwxr-x. 1 185101 330209 5145 Nov 15 2009 db2setup

as follows: -

$ cd /tmp
$ ./db2setup

Take a look at /tmp/db2setup.log: -

DB2 Setup log file started at: Mon 09 Apr 2012 08:48:02 PM BST BST

Operating system information: Linux 2.6.32-220.7.1.el6.x86_64.#1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64

If needed, try running: -

$ ./db2setup -t /tmp/db2setup.trace

in order to run it in debug / trace mode.

Once you've done this, take a look at the trace files: -

-rw-r--r--. 1 root root 462K Apr 9 20:51 db2setup.trace.ctrc
-rw-r--r--. 1 root root 190K Apr 9 20:51 db2setup.trace.jtrc
-rw-r--r--. 1 root root 69K Apr 9 20:51 db2setup.trace_lp

Paul Butler said...

Hi David, thanks for the steps above, I am able to install the 97. code in Centos 6.2 (Virtual image), and everything is fine, except creating a database takes a lifetime. I have just gone to the DB2 first steps to build the sample database, and although it worked, it took about 15 mins!!

Looking at some other posts, I have a feeling that the kernel.shm... entries in sysctl.conf might need looking at.

I just took the defaults from the Centos install.

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456