Friday, March 16, 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

WARNING:
   The 32 bit library file libstdc++.so.6 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 libstdc++.so.6

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

http://portal2portal.blogspot.co.uk/search?q=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: -

http://portal2portal.blogspot.co.uk/2009/06/sql0970n-when-running-db2sampl-on-unix.html

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 :-)

No comments:

Post a Comment