This section contains instructions that you must follow before installing DB2.
Preparing for the installation of DB2
Install the pdksh-5.2.14-1.i386.rpm package from the Caldera OpenLinux CD-ROM in the /Packages/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package:
bash# rpm -ivh /mnt/cdrom/Packages/RPMS/pdksh-5.2.14-1.i386.rpm |
Remove the jdk package, (JDK 1.2.2 from Sun), since it will conflict with the IBM Developer Kit for Java that you will install in the next step. To remove Sun's JDK, issue the following command as root:
bash# rpm -e jdk |
Install the IBM Developer Kit for Java. A brief set of installation directions is included in Section 11.
Edit the JAVA_HOME and PATH entries in /etc/config.d/shells/bashrc to remove the references to the JDK from Sun and update them to reflect the IBM Developer Kit for Java. The section that I changed started as:
[ -z "$JAVA_HOME" ]&& [ -d /usr/java ] && ( export JAVA_HOME=/usr/java [ -r $JAVA_HOME/lib/classes.zip ] && export CLASSPATH=$JAVA_HOME/lib/classes.zip ) |
Replace it with the following section to reflect the default locations for the IBM Developer Kit for Java:
[ -z "$JAVA_HOME" ]&& [ -d /usr/jdk118 ] && ( export JAVA_HOME=/usr/jdk118 export PATH=$PATH:$JAVA_HOME/bin [ -r $JAVA_HOME/lib/classes.zip ] && export CLASSPATH=$JAVA_HOME/lib/classes.zip ) |
Follow the instructions in Section 4 the generic section on installing DB2, and go ahead and create the instances. It's probably a good idea at this point to read through Section 3.1.3 to keep in mind the steps that you need to take after installing DB2.
It means something went slightly wrong, but it's okay. You may get this message splashed across your installation screen one or more times during the DB2 installation process, but other than not looking pretty, DB2 still installs correctly. Caldera apparently doesn't include a /etc/login.defs configuration file. The file controls the default options for the useradd command for adding new users, including policies like how many days before the new user's password expires and whether a home directory should be created for a new user. For more information on the /etc/login.defs file, refer to the man page for useradd.
This section contains instructions that you must follow after installing DB2.
The most important step is to manually add the instance user ID to the corresponding instance group you defined during the instance creation step. DB2 and Caldera OpenLinux don't get this part of the DB2 instance creation process right, so you have to do it yourself. You can add an instance user ID to an instance group in two ways:
Edit /etc/group to add the appropriate instance user ID to the last field for each group.
Use the COAS utility to manage your groups by selecting menu, , , , , then selecting the submenu and the menu item.
The DB2 Control Center and the DB2 Information Center use the Netscape browser to display help and documentation. This works for the first document you display in the browser, but if you try to switch to a different DB2 document (for example, from one book to another), you may instead be redirected to the default home page set by the Caldera OpenLinux installation process. I found that this problem went away as soon as I changed the default home page in the
menu, menu item.Add a file called .hushlogin to the home directory of each of your instance user IDs. This should prevent the Welcome to your OpenLinux system! messages while running DB2 commands.
DB2 generates these messages on Caldera because the DB2 commands run under the root user ID, which in turn becomes the instance owner to invoke commands. Part of this su process calls one or both of /etc/config.d/shells/csh.login and /etc/config.d/shells/profile, which in turn call the /etc/config.d/shells/OL-greeting script that contains the offensive string.
Instead of adding .hushlogin to every user's home directory, you could probably edit /etc/config.d/shells/OL-greeting to remove the message (or change it to something else, if you want). I haven't tried it myself, so let me know what works best.
The DB2 server and command line DB2 client works on Mandrake Linux 7.2, and I was able to successfully start and use the DB2 Control Center with IBM JDK 1.1.8 (build 20000713).
Preparing for the installation of DB2
Install the pdksh-5.2.14-8mdk.i586.rpm package from the Mandrake Linux CD-ROM in the /Mandrake/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package:
bash# rpm -ivh /mnt/cdrom/Mandrake/RPMS/pdksh-5.2.14-8mdk.i586.rpm |
When you run db2setup, you may receive the following error: ksh: /etc/profile.d/tmdir.sh[9]: source: not found This is only a warning message and you can continue installing DB2. If the message interferes with the db2setup menu, press CTRL-L to clear the screen.
Otherwise, follow the instructions in Section 4, the generic section on installing DB2 and creating instances.
Preparing for the installation of DB2
Install the pdksh-5.2.14-12mdk.i586.rpm package from the Mandrake Linux CD-ROM #2 in the /Mandrake/RPMS2/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package:
bash# rpm ivh /mnt/cdrom/Mandrake/RPMS2/pdksh-5.2.14-12mdk.i586.rpm |
The Linux 2.4 kernel changes the default values of some ipc limits. However, the default value for the msgmni is 16, which causes difficulties running DB2 with the default 2.4 kernel ipc parameters. Fortunately, the 2.4 kernel also enables you to change a number of these parameters through the /proc filesystem. With the 2.4 kernel, you do not have to recompile your kernel to experiment with different parameter values. To set the msgmni kernel parameter at boot time, append the following lines to /etc/sysctl.conf:
# Sets maximum number of message queues to 128 # Set this to 1024 or higher on production systems kernel.msgmni = 128 |
Uninstall the default Mandrake Linux 8.1 Kaffe Virtual Machine with Package Manager or Software Manager. Install the IBM Developer Kit for Java by issuing the following command as root:
bash# rpm -ivh IBMJava118-SDK-1.1.8-5.0-i386.rpm |
To set up the Java environment for all or specific users in Mandrake Linux 8.1, copy the content of /usr/jdk118/bin to /usr/bin and /usr/jdk118/lib to /usr/lib. After that you can successfully issue the
java -fullversion |
To install DB2 Warehouse Control Database, you must change the permissions for the /home directory to read, write and execute (for users, groups, others) as a user with root authority:
bash# chmod ugo=rwx /home |
When you run db2setup, the DB2 Product Messages and DB2 Product Library menus can interfere with the db2setup main menu. If this happens, press CTRL-L to clear the screen.
You must perform the following steps as a user with root authority.
Removing DB2 on Mandrake Linux 8.1
List all DB2 instances:
bash# /usr/IBMdb2/V7.1/instance/db2ilist |
Drop each instance listed in the previous step with the following command:
bash# /usr/IBMdb2/V7.1/instance/db2idrop <instanse-name> |
Drop the DB2 administration server:
bash# /usr/IBMdb2/V7.1/instance/dasidrop `/usr/IBMdb2/V7.1/instance/dasilist` |
Uninstall all of the DB2 packages on your system using the db2deinstall command on your DB2 CD-ROM:
bash# /mnt/cdrom/db72pf5u/db2_deinstall -n |
To remove all users (db2inst1..db2instN, db2fenc, db2as) created by DB2 issue the following commands:
bash# userdel -r db2inst1 bash# .. bash# userdel -r db2instN bash# userdel -r db2fenc1 bash# .. bash# userdel -r db2fenc2 bash# userdel -r db2as |
Preparing for the installation of DB2
Install the pdksh-5.2.14-2.i386.rpm package from the Red Hat CD-ROM in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package:
bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-2.i386.rpm |
Follow the instructions in Section 4, the generic section on installing DB2 and creating instances.
Preparing for the installation of DB2
Install the pdksh-5.2.14-12.i386.rpm package from Red Hat CD-ROM (2) in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the pdksh package:
bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-12.i386.rpm |
For a compatible version of the libstdc++ library, install the compat-egcs-c++-6.2-1.1.2.14.i386.rpm package from Red Hat CD-ROM (2) in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the compat-egcs-c++ package:
bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/compat-egcs-c++-6.2-1.1.2.14.i386.rpm |
Install the compat-libs-6.2-3.i386.rpm package from Red Hat CD-ROM (2) in the /RedHat/RPMS/ directory. For example, log in as root, mount the CD-ROM, and enter the following command to install the compat-libs package:
bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/compat-libs-6.2-3.i386.rpm |
The db2setup command looks for a file called /usr/lib/libncurses.so.4 and will not proceed unless it exists, so create a symbolic link from the ncurses4.0 library in /usr/i386-glibc21-linux/lib/ to your /usr/lib/ directory.
bash# ln -sf /usr/i386-glibc21-linux/lib/libncurses.so.4.0 /usr/lib/libncurses.so.4 |
The default setting for the msgmni kernel parameter only allows a couple of simultaneous connections to DB2. To set this value at at boot time, append the following lines to /etc/sysctl.conf:
# Sets maximum number of message queues to 128 # Set this to 1024 or higher on production systems kernel.msgmni = 128 |
Follow the instructions in Section 4, the generic section on installing DB2 and creating instances.
Red Hat 7.1 enabled the floating stack feature of the glibc library. Unfortunately, this causes Java programs using IBM JDK 1.1.8, including the DB2 Control Center, to fail miserably. Fortunately, you can disable the floating stack by setting the LD_ASSUME_KERNEL environment variable to 2.2.5 before running the DB2 Control Center as follows:
bash$ export LD_ASSUME_KERNEL=2.2.5 bash$ db2set DB2ENVLIST=LD_ASSUME_KERNEL bash$ db2jstrt 6790 bash$ db2cc 6790 |
With IBM JDK 1.3 (IBMJava2-SDK-1.3-7.0-i386.rpm), the DB2 Control Center started successfully without any workarounds. For instructions on installing the IBM JDK, see Section 11.
At some point in its past, SuSE included an old beta version of DB2 in their distribution. When you install SuSE Linux, up to and including version 7.0, the SuSE installer still creates the default DB2 user IDs and sets their home directories in /usr/lib. This can cause some difficulties when you set up the DB2 instances. Before installing DB2, remove the default DB2 user IDs by issuing the following commands as root:
bash# userdel -r db2as bash# userdel -r db2fenc1 bash# userdel -r db2inst1 |
Follow the instructions in Section 4, the generic section on installing DB2.
TurboLinux 6.0 includes all of the required packages at or above the minimum required levels for DB2 Version 7.1.
Follow the instructions in Section 4, the generic section on installing DB2.