DB2 Version 7.1 for Linux HOWTO
Dan Scott
Revision History
Revision 1.2.2 2001-01-29 Revised by: dbs
Using the 2.4 kernel, MSGMNI kernel parameter, Linux-Mandrake 7.2
information, SuSE 7.0 information, license management for Debian, link to
Text Extender alternative.
Revision 1.2.1 2000-10-25 Revised by: dbs
Basic Red Hat 7.0 info, additional Debian instructions.
Revision 1.2 2000-09-25 Revised by: dbs
IBM JDK 1.3 works! More troubleshooting.
Revision 1.1 2000-07-28 Revised by: dbs
Documented _SHM_ID_BITS kernel parameter tuning for increasing number of
available connections. Added basic indexing.
Revision 1.0 2000-07-06 Revised by: dbs
Added basic Debian instructions. Corrected some factual, stylistic, and
grammatical mistakes. Licensed document under GNU GPL. Submitted document to
LDP.
Revision 0.7 2000-04-26 Revised by: dbs
Based on DB2 V7.1 beta release, wrote install instructions for Caldera 2.4,
Red Hat 6.2, SuSE 6.2, SuSE 6.3, and TurboLinux 6.0.
This HOWTO gives you explicit instructions on installing DB2 Universal
Database Version 7.1 for Linux on the following Intel x86-based
distributions: Caldera OpenLinux 2.4, Debian, Linux-Mandrake 7.2, Red Hat
Linux 6.2, SuSE Linux 6.2, 6.3, and 7.0, and TurboLinux 6.0. After installing
DB2, you can work with a sample database, connect to your DB2 server from a
remote machine, and administer DB2 using the DB2 Control Center.
-----------------------------------------------------------------------------
Table of Contents
1. Introduction
1.1. Why a DB2 installation HOWTO?
1.2. Who should read this HOWTO?
1.3. New versions of this document
1.4. Copyright and License
1.5. Credits
1.6. About the author
2. Prerequisites
2.1. What are prerequisites?
3. Preparing your distribution for DB2
3.1. Caldera OpenLinux 2.4
3.2. Linux-Mandrake 7.2
3.3. Red Hat Linux 6.2
3.4. SuSE Linux
3.5. TurboLinux 6.0
4. Installing DB2 using db2setup
4.1. Using the db2setup utility
4.2. Installing DB2 components
5. Installing DB2 on other Linux distributions
6. Creating DB2 instances
6.1. Overview of DB2 Administration Server
6.2. Overview of DB2 instance
7. Removing DB2
8. Using DB2
8.1. DB2 Control Center
8.2. DB2 Information Center
8.3. The DB2 command line
9. Troubleshooting
9.1. Problems with DB2 installation
9.2. Problems creating a DB2 instance
9.3. Problems using DB2
10. Improving DB2 Version 7.1 performance on Linux
11. Installing the IBM Developer Kit for Java
12. Using the 2.4 kernel with DB2 Version 7.1
A. Resources
B. GNU General Public License
B.1. Preamble
1. Introduction
1.1. Why a DB2 installation HOWTO?
Ever since DB2 Version 5.2 was ported to Linux in 1998 and made available as
a beta download, there has been a lot of interest in DB2 on Linux. The beta
represented one of IBM's first dips into the waters of Linux, and it
generated a lot of feedback. In fact, if you read through the newsgroups, you
still see occasional questions from people who are trying out the Version 5.2
beta. (I don't know where they're getting it, but they're out there.) And,
not surprisingly, they run into problems. It was a beta product, after all.
Anyway, I've been trying out DB2 on Linux since Version 5.2, so I've had a
chance to witness the improvements over the past couple of years. I've also
made a lot of use of the Linux Documentation Project in that time, and wanted
to contribute something to the LDP. So I decided to write about the one thing
that I really know something about on Linux, and hope that it helps someone
else out there.
DB2 on Linux has come a long way since Version 5.2. The first supported
release of DB2 on Linux was Version 6.1 in 1999, which removed many of the
installation hurdles faced by the Version 5.2 beta testers.
DB2 Version 7.1 is the second major release that supports Linux, and since
it's a new release I'm expecting that a new wave of people curious about DB2,
as well as people migrating from Version 6.1, are going to try installing
this new release on Linux. To that end, I'm writing this HOWTO to share my
experiences and help smooth your installation. One of the big boosts comes
from the standardization on the IBM Developer Kit for Java, which improves
the stability of the DB2 Control Center and enables application developers to
write stored procedures and UDFs in Java. DB2 Version 7.1 also introduces the
ability to write stored procedures in SQL.
As time permits, I hope to provide hints and tips for improving the
performance of DB2 on Linux, and for configuring the environment on various
Linux distributions to be able to build DB2 applications in C, C++, and Java.
-----------------------------------------------------------------------------
1.2. Who should read this HOWTO?
If you plan to install DB2 Version 7.1 on one of the Linux distributions
supported by IBM, this document is for you. The distributions that IBM
officially supports are:
��*�Caldera OpenLinux 2.4
��*�Red Hat Linux 6.2
��*�SuSE Linux 6.2 and 6.3
��*�TurboLinux 6.0
For Debian and Slackware, I have included very basic installation
instructions or links to other resources in Section 5. If you have any other
installation success stories, please forward me the details and I'll try to
expand the section. As time permits, I plan to try to duplicate and confirm
these installation instructions.
If you install DB2 Version 6.1 for Linux and DB2 hangs on the db2start
command, see [
http://www-1.ibm.com/servlet/support/manager?rt=1&rs=0&q=
1000814] db2start hangs on Linux distributions built with glibc 2.1. I don't
include any other DB2 Version 6.1 information in this document. If you plan
to install DB2 Version 5.2 on Linux, don't! (Have I emphasized that point
enough? All right, I'll stop now.) The Personal Developer's Edition of DB2
Version 7.1 is available as a free (beer) download from IBM, at the DB2
Universal Database download site. Registration is required, and, of course,
your copy of DB2 is only free as long as you don't use it in a production
environment.
This document is really meant to help you install DB2 Version 7.1 on the
previously listed Linux distributions. I've installed DB2 on all of the
distributions supported by IBM and noted the prerequisites and quirks for
each of them. I don't go into detail about the various features of DB2, or
what each installation option means, but I do cover the basics that you need
to know to get it installed.
-----------------------------------------------------------------------------
1.3. New versions of this document
I like my friends at the Linux Documentation Project, so you'll always be
able to find the most up-to-date version of this document at the LDP web site