Installing DB2 ver 6.1 (Enterprise Edition) on Caldera OpenLinux


Here is a brief HOW-TO for installing DB2 on Caldera OpenLinux 2.3, kernel 2.2.10.
Please note that your mileage may vary if you are using a different Linux distro

System Requirements

Please download the following :
  1. JDK1.1.7v3 (Blackdown port) from Blackdown's site
  2. Cryptographic libraries (glibc-crypt-static and glibc-crypt) from Linuxland
  3. Public Domain Korn Shell (pdksh 5.2.14) from Redhat or one of the mirrors, or Linuxberg!There is also a way to work around the problem. Here is a reply I got from Dan Scott of IBM (see below)

You will also need the following files, which can be found on the COL2.3 CD :

  1. libstdc++-compat-2.8.0-1.i386

For a complete listing of hardware requirements, please refer to the DB2 CD. There is a checklist that you can use to size your server in the Quick Beginnings for Linux book.


Installation Procedure

  1. Remove default JVM in COL2.3 :
  2. # rpm -e jdk-shared
  3. # rpm -e jdk-static
  4. # rpm -e jdk
  5. # rpm -e kaffe
  6. Copy jdk117_v3.tar.gz to /opt
  7. Insert the COL2.3 CD and install the libstdc++-compat RPM (found in your /col/contrib directory)
  8. Install glibc-crypt (no dependencies, replace files)
  9. Install glibc-crypt-static (no dependencies, replace files)
  10. Install pdksh (must be rpm. tarballs will give an error)
  11. Install jdk117_v3 : tar -zxvf jdk117_v3*
  12. add /opt/jdk117_v3/bin to PATH in /etc/profile
  13. Run "source /etc/profile" to set the PATH
  14. Now it's time to install DB2
  15. Insert DB2 CD and mount it (which should not be necessary for an out-of-box COL2.3 install)
  16. If your Auto-Mount Daemon (AMD) is running, simply do this :
  17. # cd /auto/cdrom
  18. # ./db2_install
  19. When the installation program starts, it will prompt you to choose a product. Choose "DB2.ENTP"
  20. The installation program will continue and you should see the progress (indicated by # signs)
  21. When the installation completes, it is time to create the instance and install the documentation
  22. # ./db2setup
  23. Tab to [Create DB2 Instance]
  24. Select "Properties"
  25. Go through the authentication type and connection protocol and note down the values. You can accept the defaults.
  26. No need to check start db2 instance automatically on boot. If you do, DB2 will insert a line in your inittab, but it doesn't seem to work in COL2.3. You will need to start the instance manually
  27. Accept the default values for the Instance owner, and specify a password in the Password field.
  28. Next the Fenced User will need to be created. What does this user do ? Right now, I really have no idea!
  29. Accept the defaults for the Fenced User and specify a password
  30. Next, create the Administration server. Accept defaults again and specify a password
  31. Note : if you do not specify a password, a default password will be assigned to you
  32. Just say OK to everything and let DB2 setup the necessary stuff for you.
  33. The last message should be SUCCESS!
Note : There is no need to reboot. Just carry on with the Post-Installation...

Post-Installation

  1. Logout first, then login as db2inst1
  2. Open a Terminal and type : db2start. This will start the database engine. Please note that if you selected the "start db2instance automatically on boot" option, DB2 would have been started already. If you're not sure, it's OK to just type the command because DB2 would automatically detect if it is already running
  3. To test some SQL commands, at the prompt, type db2 and press
  4. Then issue the statement : connect to sample, press
  5. Followed by the SQL command : select * from employee, press
  6. You should see a whole bunch of names scrolling across the screen
  7. To end the session, type connect reset or just quit
  8. You will now need to start the Admin Server, you need to logout as the current user and login again as db2as. To start the Admin Server, type db2admin start and
  9. There is a graphical method to looking at the database, and the GUI runs on Java, so you need to be sure that your jdk117v3 is properly installed (check your PATH!) and functioning.
  10. To check it out, go to the next section

Running the Java Utilities

  1. Open a Terminal window and type db2jstrt and . This starts the Java security manager. This is a very important step ! Without it, all the Java utilities and applets and other stuff relying on Java will NOT work !! It's that secure
  2. Next type db2cc and
  3. A login screen should pop up. Login as db2inst1, if you want to browse the database tables and stuff. You can also login as root or db2as, but you wouldn't be able to see as much stuff. Remember that the instance owner is the only person allowed to browse through its own database!In my country, this type of paranoid security mechanism is called kiasu.
  4. There is one more step you may have to do before you can browse through the database, and that is to start the Administration Server. Errors may occur if your Admin Server isn't started (See point 8 under Post-Installation for instructions on how to do this)
  5. The GUI that you should see after login is called the Java Control Center. Some people refer to it as the Web Control Center, especially those of us who tried out the beta, back when it was offered in 1998 !
Important Note :
Turn off your Auto-Mount Daemon (AMD) on boot! (Use lisa or COAS to do this)
There seems to be a very strange bug that causes AMD to hang on boot after DB2 is installed ! I haven't had time to look into this yet. Will update as and when I get a solution...

Footnotes

Using the pdksh tarball instead of the rpm!

Background

==================================
My original post to comp.databases.ibm-db2
===================================
I'm having trouble installing DB2 on COL2.3. Specifically, the error it gives me is :
"/bin/ksh is needed by ".

I'd followed the instructions on Caldera's site and I downloaded and installed pdksh from a tarball. I added an entry inside /etc/shells to recognize that the ksh is in /usr/local/bin, and I tried again. Same error.

I tried doing a symlink to /bin and tried. Same error.

I tried executing ksh from the bash prompt and I got into the Korn shell! So I assume the system *can* find ksh, but for some reason, DB2 cannot.

Can someone help me, please ?

Thanks and Regards,
Chong Yu Meng

============================================
Reply from Dan Scott from IBM, Canada --Thanks Dan !
============================================

Chong:

The db2setup program relies on RPM to know whether the Korn shell is installed or not. So when you installed pdksh from a tarball (an approach that I generally prefer for almost any software package), the RPM database wasn't updated.

You can, however, update RPM manually. Download the pdksh RPM package, and use the "rpm --install --justdb " command syntax. This should allow the db2setup program to overcome its dependency checking (it will "find" /bin/ksh) and continue with the install.

Dan


Created by Chong Yu Meng. November 13, 1999. First draft.