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. And, not surprisingly, they ran into problems. It was a beta product, after all.

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 was the second major release that supports Linux. I wrote this HOWTO to share my experiences and help smooth the installation path of those new to DB2, Linux, or both. The standardization on the IBM Developer Kit for Java improved the stability of the DB2 Control Center and enabled application developers to write stored procedures and UDFs in Java. DB2 Version 7.1 also introduced the ability to write stored procedures in SQL.

DB2 Version 8 is the most recent release. Support was added for Linux distributions on architectures beyond Intel 32-bit processors, including AMD 64-bit processors, Intel 64-bit processors, POWER PC processors, and Linux on zSeries. If you're just starting out with Linux or DB2, I strongly urge you to consider going directly to DB2 Version 8 to take advantage of all of the additional features, stability, and performance it offers. For information on installing DB2 Version 8 on Linux, please refer to the Web sites section of Appendix A.

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:

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

1.4. Copyright and License

Copyright (c) 2000, 2003 International Business Machines Incorporated.

This document is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this document; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

1.5. Credits

Dan Scott is the originator and current maintainer of this HOWTO. Please send all suggestions for improvement, criticisms, or more-or-less related questions to me at (remove REM in my email address before sending). Please send all spam or hate mail to /dev/null.

Feedback and suggestions for improvement have been provided by Susan Williams, Serge Boivin, Darin McBride, and Xiaoyan Zhao. Ronnie Seagren did an awesome job of editing the original version for style and consistency.

Additional thanks to:

1.6. About the author

Dan Scott has been employed by IBM Canada as an Information Developer since 1998—approximately when DB2 was first ported to Linux. It's probably just coincidence. He has documented and tested DB2 application development for the bulk of that time. In his spare time he can occasionally be found mourning for his motorcycle (in storage for the winter), abusing his body on his mountain bike, or contemplating how to upgrade his Linux distribution at home (which started life as Mandrake 5.3 and has mutated wildly ever since) without suffering the wrath of his girlfriend (er, make that wife now).