So, to fill that void, I've written up this install guide. After suffering through a 7 hour installation that left me with an only partially functional system, I've decided to write up a document on the process so that other people don't have to go through as much hair-pulling as I did. I am indebted to the authors of the pages listed at the bottom of this guide. These two pages had the answers to nearly every single one of my problems. Unfortunately, I didn't find them until nearly 5 hours into my first installation. I have used the information from these two guides and added extra information of my own to make this guide. It is my hope that this guide will make installing Oracle 9i on a Debian GNU/Linux system as painless as possible. So lets get started shall we?
NOTE: I would strongly suggest that, if you have the time, you do the installation twice. Once to see which problems you're going to encounter, and again to get a clean install by preempting the errors. Note that this install is not easy, and it is not for the faint of heart. It is my hope, however, that with this document it will be a much easier task. My first semi-functional installation took ~7 hours, most of it spent tracking down solutions to various problems. Now that I know what to look for, I can get an installation done in about 15 minutes. Hopefully, this document will help you enough to put you much closer to the 15 minute mark than the 7 hour mark. Now, on to the guide.
The system that I'm using is a Debian GNU/Linux Sid (unstable) machine. The machine has an AMD AthlonXP 2000+, with 768 MB DDR RAM, and 90 GB of hard drive space on a RAID0 array controlled by a 3ware 7000-series Escalade board.
For starters, you'll need to have the appropriate software available. You can download Oracle 9i directly from Oracle. The package that I used is the full Oracle 9i distribution. It's 3 disks, coming out to ~1.5 GB all together. Once you've downloaded everything you'll need to use gunzip to decompress the files, and then cpio to get the contents of the archive.
gunzip lnx_920_disk?.cpio.gz
cpio -idmv <
lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv <
lnx_920_disk3.cpio
You can burn them all to CD, though if you
have the free space, it's probably much faster to just run them from your hard
drive.
Before continuing further, I would suggest that you look over the Oracle installation documentation provided on disk 1 (doc/unixdoc/a96167/toc.htm), particularly the pre-install information (doc/unixdoc/a96167/pre.htm#sthref101) and, more specifically, the kernel parameters section. (doc/unixdoc/a96167/pre.htm#CHDHDABJ)
Now that you have all the required packages, it's almost time to run
the installer. First, however, you'll need to check which version of gcc you're
using. gcc -v
will show you which version of gcc you're using. In
order to install Oracle you should make sure that you're using gcc 2.95. If
you're using 3.0 or later, you'll need to install gcc-2.95 (if it's not already
installed) and then modify the /usr/bin/gcc symlink to point to
/usr/bin/gcc-2.95.
Oracle also needs version 2.1.30 of the Open Motif libraries. As of the time of this writing, Sid is using 2.2.2. In order to install 2.1.30 it's necessary to download the Woody package for libmotif and install it. Unfortunately, lesstif2 conflicts with libmotif 2.1.30, and along with it goes xpdf. If you're not going to be using any of the GUI tools with Oracle, you can probably do without installing libmotif 2.1.30, though it may cause some problems during installation. If in doubt, go ahead and install the package now, and then remove it after installation is complete if you don't need to use any of the GUI tools.
Now, with that out of the way, you can start the installer. If you're
installing from your HD, just type ./runInstaller
from Disk1. If
you've burned the packages to CD, make sure that you are not in a mounted
CD-ROM directory (cd ~) and then run the installer with the full
path (e.g. /cdrom/runInstaller or
/mnt/cdrom/runInstaller).
Note: Throughout the rest of this guide, I will be referring to directories by their environment names, $ORACLE_HOME and $ORACLE_BASE. When the installer asks you to supply a base directory, we will be dealing with $ORACLE_BASE. When it asks for a home directory, we will be dealing with $ORACLE_HOME. In my case, here are the actual directories I'm using:
$ORACLE_BASE = /usr/local/oracleDuring the installation, you will be given 3 choices. The first is a choice of which product to install. This guide is assuming that you select "Oracle9i Database". Next is the Installation Type. This guide is assuming that "Standard Edition" will be selected. Following that, for Database Configuration the guide assumes a selection of "General Purpose". And finally, the guide will assume a selection of ISO-8590-1 for the locale. You are free to select whichever options you need during installation, but the remainder of these steps are written in the order they are likely to appear during installtion with the selections above.
$ORACLE_HOME = $ORACLE_BASE/products/Oracle9i
At this point, the installation should be chugging along happily. So, naturally, it's time to address the plethora of errors that will start appearing.
Error in invoking target install of makefile
/usr/local/OracleDB/ctx/lib/ins_ctx.mk
I've found a few
possible workarounds for this, depending on what is causing the error. Open up
$ORACLE_HOME/install/make.log and look for the last error and follow the
solution as presented below:
undefined symbol: statThis fix is detailed here.
stas630 (stas630@rusmedia.net) has supplied me with the following patch. This looks like it may be a better choice than the above fix. Please let me know what your experiences with this fix are:
Indications: $ORACLE_HOME/ctx/lib/libsc_ut.so: undefined symbol: statHere are a few other patches I've received:
RDBMS Version : 9.0.1
Platform : Intel based Linux System
Files: ins_ctx.mk, bug2037255.o
Instructions:
1. Ftp files ins_ctx.mk and bug2037255.o provided in this patch to a local directory.
2. cd to $ORACLE_HOME/ctx/lib.
3. Rename ins_ctx.mk to ins_ctx.mk.pre2037255.
4. Copy ins_ctx.mk and bug2037255.o copied in step 1 to $ORACLE_HOME/ctx/lib.
5. Invoke following command: make -f ins_ctx.mk ictxhx
6. Patch is applied and ready to work.
/lib/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'This fix is detailed here.
/usr/bin/ld: ctxhx: hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSOMatt Sapp (matt@mnu.edu) has reported that using a version of 'ld' and 'libbfd' (both are part of the binutils package) from stable (Woody) fixes this problem. He reported using 'libbfd-2.13.90.0.18.so'. Looking through the debian archives, however, it seems that stable "officially" uses 'libbfd-2.12.90.0.1.so'. If you try using binutils from stable or if you have more information on where exactly to get libbfd-2.13 please let me know. I have not personally tried this fix, so do it at your own risk. Messing around with binutils is not something to be taken lightly.
I have been just hitting "Ignore" on this particular error and moving on in my installs. After 3 months I have not yet encountered any adverse side effects, though this is NOT a mission-critical system. If you have another fix for this, please let me know!
Open up $ORACLE_HOME/bin/dbca and change JRE_DIR to point to a local working copy of the JRE. Assuming that you have a relatively recent copy of the JRE, you'll also need to change two lines toward the bottom.Bricklen Anderson (BAnderson@PresiNET.com) has informed me that you can also use a copy of the JRE shipped with Oracle. It is located at $ORACLE_HOME/oracle.swd.jre. Note that on my installation this directory does not exist. This is included as an alternative for those people who do not have a local version of the jre installed and who do have the Oracle supplied one available.$JRE_DIR/bin/jre
will now become$JRE_DIR/bin/java
.
If you'd like to preempt this problem, while the dialog to run root.sh is still on the screen, make the necessary changes to $ORACLE_HOME/bin/dbca.
Unfortunately, there are no simple fixes for this one. Nothing short of patching and recompiling libc6 from scratch. The problem is in a typo in the libc6 source. It should be fixed in 2.3.2, but since Debian unstable is still using 2.3.1, we have to do this the hard way. More details are available here. The instructions that I followed are available here. I've got my own version of the procedure which should address some of the difficulties that I encountered while trying to do this myself the first time:
apt-get source libc6
cd glibc-2.3.1
tar -xvvjf glibc-2.3.1.tar.bz2
sensible-editor glibc-2.3.1/elf/dl-runtime.c
ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)
& 0x7fff];
will now look like this:
ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)]
& 0x7fff;
LC_ALL=C TZ=UTC0 diff -Naur glibc-2.3.1/elf/dl-runtime.c~
glibc-2.3.1/elf/dl-runtime.c >
debian/patches/oracle-dl-runtime.dpatch
sensible-editor
debian/patches/oracle-dl-runtime.dpatch
#! /bin/sh -e
# DP: Oracle fix for dl-runtime.c, as per http://forums.gentoo.org/viewtopic.php?t=35340
if [ $# -ne 2 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
The final result should look like this:
You can try just pasting this whole chunk into a file, but it didn't work for me. Using that approach, the patch would not apply. The few extra steps outlined above should save you some trouble. This will create a debian patch file that will be executed when you build the package.#! /bin/sh -e # DP: Oracle fix for dl-runtime.c, as per http://forums.gentoo.org/viewtopic.php?t=35340 if [ $# -ne 2 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 --- glibc-2.3.1/elf/dl-runtime.c~ 2003-05-22 13:00:29.000000000 +1000 +++ glibc-2.3.1/elf/dl-runtime.c 2003-05-22 13:00:50.000000000 +1000 @@ -84,7 +84,7 @@ { const ElfW(Half) *vernum = (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); - ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff]; + ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff; const struct r_found_version *version = &l->l_versions[ndx]; if (version->hash != 0) @@ -179,7 +179,7 @@ { const ElfW(Half) *vernum = (const void *) D_PTR (l,l_info[VERSYMIDX (DT_VERSYM)]); - ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff]; + ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff; const struct r_found_version *version = &l->l_versions[ndx]; if (version->hash != 0)
echo "oracle-dl-runtime" >>
debian/patches/0list
sensible-editor debian/changelog
glibc (2.3.1-17.Thief) unstable; urgency=low * Alex Malinovich- debian/patches/oracle-dl-runtime.dpatch: Fix Oracle issues. -- Alex Malinovich Fri, 13 Jun 2003 04:01:24 -0500
dpkg-buildpackage -us -uc
cd /proc/sys/kernel
echo 100 32000 100 100 > sem
echo 2147483648 > shmmax
echo 4096 > shmmni
echo 2097152 > shmall
You may want to put this into a startup script to make sure you don't run into problems after rebooting. The above values are the suggested values from the documentation. They work just fine for me, however, YMMV. More precise details are available in your Oracle documentation. On disk 1 of the install set, look at doc/unixdoc/a96167/pre.htm#CHDHDABJ.
This leaves you with two choices. You can either leave the dbca broken for now so that the rest of the tasks can run, or you can wait for the dbca to finish and exit the installer. If you leave dbca broken, then after installation is complete just fix it and run it manually. If you choose to fix it ahead of time, then you will need to run the Agent Configuration Assistant and launch Apache manually.
http://polydistortion.net/monkey/archives/2003/05/22/001730.html#001730
A
fantastic writeup for installing Oracle on a Debian system. The vast majority of
the information you see in my writeup came directly from here. I have just tried
to expand on it where necessary, and include issues that I encountered which
original author didn't.
$ORACLE_HOME/install/make.log
and
look for an error such as /usr/bin/ld: cannot find -lXt
. If you
see this error you will also need to install the xlibs-dev package.Error in invoking target install of makefile /usr/local/oracle/plsql/lib/ins_plsql.mkTo get around this, you will need to edit the file
$ORACLE_HOME/bin/genclntsh
.
Look for a line that reads:
LD_SELF_CONTAINED="-z defs"
and change it
to read:
LD_SELF_CONTAINED=""
Now execute
./genclntsh
and wait for it to finish. This will take a few
minutes. When it is done you should see a message saying: "Created
/usr/local/oracle/lib/libclntst9.a". Now just click "Retry" in the installer's
error dialog, and off you go.