This commit is contained in:
gferg 2000-10-24 22:13:08 +00:00
parent e95573383e
commit 45f8faf82e
3 changed files with 308 additions and 5 deletions

View File

@ -8,6 +8,13 @@
<author><firstname>Dan</firstname><surname>Scott</surname></author>
<authorinitials>dbs</authorinitials>
<revhistory>
<revision>
<revnumber>1.2.1</revnumber>
<date>October 25, 2000</date>
<authorinitials>dbs</authorinitials>
<revremark>Basic Red Hat 7.0 info, additional Debian instructions.
</revremark>
</revision>
<revision>
<revnumber>1.2</revnumber>
<date>September 25, 2000</date>
@ -115,7 +122,7 @@ distributions to be able to build DB2 applications in C, C++, and Java.
<para>
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 supports are:
IBM officially supports are:
<itemizedlist>
<listitem>
<para>
@ -224,6 +231,23 @@ 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.
</para>
<para>
Additional thanks to:
<itemizedlist>
<listitem>
<para>Andika Triwidada for contributing instructions to install
DB2 V7.1 on Debian using the <command>rpm</command> utility.
</para>
</listitem>
<listitem>
<para>
Michael Naughton for braving Red Hat 7 and figuring out the
<filename>libncurses.so.4</filename> prerequisite.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>
@ -344,10 +368,26 @@ IBM sets prerequisites based on the systems with which they tested.
</listitem>
</varlistentry>
<varlistentry>
<term>libncurses</term>
<listitem>
<para><literal>4.x</literal>. For <command>db2setup</command> to work correctly,
this version of the library must be available on your system as
<filename>libncurses.so.4</filename>. Red Hat 7 installs
<literal>5.1</literal> by default, but you can install the
<ulink url="http://rpmfind.net/linux/RPM/libncurses.so.4.html"><literal>4.x</literal></ulink>
compatibility RPM to have it co-exist with <literal>5.0</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>libstdc++</term>
<listitem>
<para><literal>2.9.0</literal>. This exact version is mandatory.
On Debian 2.2, the default level is <literal>2.10.0</literal>,
but you can install version <literal>2.91.66-4</literal> using
<command>apt-get</command>.
</para>
</listitem>
</varlistentry>
@ -469,20 +509,48 @@ with the following command:
</variablelist>
<para>
In the following table:
<itemizedlist>
<listitem>
<para>
<literal>unknown</literal> indicates that I don't
know what the default level is, and I haven't installed DB2 on this distribution
(your feedback is welcome!)
</para>
</listitem>
<listitem>
<para>
<literal>okay</literal> indicates that I don't
know what the default level is, but it worked when I installed DB2
</para>
</listitem>
<listitem>
<para>
<literal>**</literal> as a prefix indicates that the default level is not acceptable
and must be replaced
</para>
</listitem>
</itemizedlist>
</para>
<table frame="all">
<title>Prequisite levels, by distribution</title>
<tgroup cols="6" align="center" colsep="1" rowsep="1">
<title>Prerequisite levels, by distribution</title>
<tgroup cols="7" align="center" colsep="1" rowsep="1">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<colspec colname="c4">
<colspec colname="c5">
<colspec colname="c6">
<colspec colname="c7">
<thead>
<row>
<entry>Package</entry>
<entry>Caldera OpenLinux 2.4</entry>
<entry>Debian 2.2</entry>
<entry>Red Hat 6.2</entry>
<entry>Red Hat 7</entry>
<entry>SuSE 6.2</entry>
<entry>SuSE 6.3</entry>
<entry>TurboLinux 6.0</entry>
@ -492,7 +560,9 @@ with the following command:
<row>
<entry>glibc</entry>
<entry><literal>2.1.2</literal></entry>
<entry><literal>2.1.3</literal></entry>
<entry><literal>2.1.2</literal></entry>
<entry><literal>unknown</literal></entry>
<entry><literal>2.1.1</literal></entry>
<entry><literal>2.1.2</literal></entry>
<entry><literal>2.1.2</literal></entry>
@ -500,15 +570,29 @@ with the following command:
<row>
<entry>Linux kernel</entry>
<entry><literal>2.2.14</literal></entry>
<entry><literal>2.2.17</literal></entry>
<entry><literal>2.2.14</literal></entry>
<entry><literal>unknown</literal></entry>
<entry><literal>2.2.10</literal></entry>
<entry><literal>2.2.13</literal></entry>
<entry><literal>2.2.13</literal></entry>
</row>
<row>
<entry>libncurses</entry>
<entry><literal>okay</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>**5.1</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>okay</literal></entry>
</row>
<row>
<entry>libstdc++</entry>
<entry><literal>2.9.0</literal></entry>
<entry><literal>**2.10.0</literal></entry>
<entry><literal>2.9.0</literal></entry>
<entry><literal>unknown</literal></entry>
<entry><literal>2.9.0</literal></entry>
<entry><literal>2.9.0</literal></entry>
<entry><literal>2.9.0</literal></entry>
@ -518,8 +602,20 @@ with the following command:
<entry><literal>5.2.14</literal></entry>
<entry><literal>5.2.14</literal></entry>
<entry><literal>5.2.14</literal></entry>
<entry><literal>unknown</literal></entry>
<entry><literal>5.2.14</literal></entry>
<entry><literal>5.2.14</literal></entry>
<entry><literal>5.2.14</literal></entry>
</row>
<row>
<entry>rpm</entry>
<entry><literal>okay</literal></entry>
<entry><literal>3.0.3</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>unknown</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>okay</literal></entry>
<entry><literal>okay</literal></entry>
</row>
</tbody>
</tgroup>
@ -1269,6 +1365,154 @@ Further information on installing DB2 on Debian is available from Tiago Antao's
<ulink url="http://tiago.org/db2-4-linux.html">Agnostic DB2 V7.1 for GNU/Linux</ulink>.
</para>
<para>
In the following section, Andika Triwidada describes how to install
DB2 on Debian 2.2 using the <command>rpm</command> command.
You can check the prerequisite package levels (described in <xref linkend="prereqs">)
installed on your system with the following command:
<programlisting>
$ dpkg -l|egrep -e '(libc6|libstdc++|pdksh|rpm|zip)'|awk '{print $1,$2,$3}'
</programlisting>
The resulting list should contain:
<programlisting>
ii libc6 2.1.3-13
ii libstdc++2.9-glibc2.1 2.91.66-4
ii pdksh 5.2.14-1
ii rpm 3.0.3-1
ii unzip 5.40-1
</programlisting>
</para>
<para>
If you are missing any of these packages, you can install the package using <command>apt-get</command>:
<programlisting>
bash# apt-get install <replaceable>package-name</replaceable>
</programlisting>
</para>
<procedure>
<title>Installation Steps</title>
<step>
<para>
Initialize the RPM database.
<programlisting>
bash# rpm --initdb
</programlisting>
</para>
</step>
<step>
<para>
Modifiy several files in <filename class="directory">/bin</filename>
<programlisting>
bash# mv /bin/sh /bin/sh.bash
bash# ln -s /usr/bin/ksh /bin/sh
bash# for f in awk basename ksh passwd sort touch; do ln -s /usr/bin/$f /bin/$f; done
</programlisting>
</para>
</step>
<step>
<para>
Copy the contents of the following script to create an RPM wrapper
called <filename>/bin/rpm</filename>.
<programlisting>
#!/bin/sh
# RPM wrapper, force RPM installation without checking any dependencies
if [ "$1" = "-ivh" ]
then
shift
/usr/bin/rpm -ivh --nodeps $*
else
/usr/bin/rpm $*
fi
</programlisting>
</para>
</step>
<step>
<para>
Make the RPM wrapper executable:
<programlisting>
bash# chmod +x /bin/rpm
</programlisting>
</para>
</step>
<step>
<para>
Install DB2 using the <command>db2setup</command> command by following
the instructions in <xref linkend="db2install">.
</para>
</step>
<step>
<para>Create the DB2 administration server and at least one DB2 instance
as described in <xref linkend="db2instance">. To simplify testing,
ensure that you create the sample database when you create the DB2 instance.
</para>
</step>
</procedure>
<procedure>
<title>Testing your DB2 installation</title>
<step>
<para>
Log on to your Linux server with the DB2 instance user ID. Remember,
the default user ID is <literal>db2inst1</literal>.
</para>
</step>
<step>
<para>
Prepare your DB2 environment by running the <command>db2profile</command>
script:
<programlisting>
bash$ cd ~/sqllib
bash$ . ./db2profile
</programlisting>
</para>
</step>
<step>
<para>
Run a query against the sample database to test your installation.
<programlisting>
bash$ db2
bash$ db2 =&gt; connect to sample
bash$ db2 =&gt; select * from employee
</programlisting>
There should be a printout of records from sample database here
<programlisting>
$ db2 =&gt; quit
</programlisting>
</para>
</step>
</procedure>
<procedure>
<title>After you install DB2</title>
<step>
<para>
Remove the RPM wrapper script by removing, renaming, or linking it directly to <filename>/usr/bin/rpm</filename>.
<programlisting>
bash# rm /bin/rpm
</programlisting>
</para>
</step>
<step>
<para>
Change <filename>/bin/sh</filename> back into a symlink to <filename>/usr/bin/bash</filename>.
<programlisting>
bash# ln -sf /usr/bin/bash /bin/sh
</programlisting>
</para>
</step>
</procedure>
</listitem>
</varlistentry>
@ -1895,6 +2139,23 @@ the <command>pdksh</command> package for your Linux distribution.
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
<emphasis>When I try to run <command>db2setup</command>, I get the following error:
<computeroutput>./db2inst: error while loading shared libraries: libncurses.so.4: cannot
open shared object file: No such file or directory</computeroutput></emphasis>
</para>
</question>
<answer>
<para>
DB2 issues this error when it can't find the <filename>libncurses.so.4</filename> library. Red Hat 7
does not include this level of the library in their standard <filename>ncurses-5.1-2</filename> package,
requiring that you install the <filename>ncurses4-5.0-2</filename> library for backwards compatibility.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
@ -2063,6 +2324,48 @@ problem, and the correct install procedure, refer to IBM Support document 100081
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
I'm using DB2 PE 7.1 on linux (RH 6.0), and I'm having problems when
trying to connect with my username and password. I can connect successfully
to the database with the default user ID:
<programlisting>
bash$ db2 connect to sample
Database Connection Information
Database server = DB2/LINUX 7.1.0
SQL authorization ID = <replaceable>userID</replaceable>
Local database alias = SAMPLE
</programlisting>
But when I try to connect to the database using the explicit user ID, it fails:
<programlisting>
bash$ db2 CONNECT TO sample USER <replaceable>userID</replaceable>
Enter current password for <replaceable>userID</replaceable>:
SQL1403N The username and/or password supplied is incorrect.
SQLSTATE=08004
</programlisting>
Why can't I connect with an explicit user ID?
</para>
</question>
<answer>
<para>
Check the ownership and permissions on the <filename>db2ckpw</filename> program.
They should look like this:
<programlisting>
bash$ ls -al ~/sqllib/security/db2ckpw
-rwsr-s--x 1 root build 15989 Oct 17 07:22 sqllib/security/db2ckpw*
</programlisting>
If this program is not owned by root, then do the following as root:
<programlisting>
bash# chown root db2ckpw
bash# chmod ug+s db2ckpw
</programlisting>
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><emphasis>I'm running out of connections for my DB2 server.</emphasis></para>

View File

@ -420,7 +420,7 @@ locale standards such as keyboard, font, paper-size etc. </Para>
DB2-HOWTO</ULink>,
<CiteTitle>DB2 Version 7.1 for Linux HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: September 2000</CiteTitle>.
<CiteTitle>Updated: October 2000</CiteTitle>.
Explicit instructions on installing DB2 Universal Database Version 7.1
for Linux on the following Intel x86-based distributions: Caldera
OpenLinux 2.4, Debian, Red Hat Linux 6.2, SuSE Linux 6.2 and 6.3,

View File

@ -459,7 +459,7 @@ Control System, under Linux. </Para>
DB2-HOWTO</ULink>,
<CiteTitle>DB2 Version 7.1 for Linux HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: September 2000</CiteTitle>.
<CiteTitle>Updated: October 2000</CiteTitle>.
Explicit instructions on installing DB2 Universal Database Version 7.1
for Linux on the following Intel x86-based distributions: Caldera
OpenLinux 2.4, Debian, Red Hat Linux 6.2, SuSE Linux 6.2 and 6.3,