Installing Oracle 9i


Oracle 9i is the result of merging almost their entire product line into two products. To say that 9i is the database is a little misleading, but this is what you need if you want to keep current with your Oracle database.

There are a few things that you need to be aware of before embarking on the installation of Oracle 9i. First are it’s hardware requirements. They’re huge, much more than 8i which itself was large.

Oracle recommend 512Mb of real memory (and twice as much swap space) and Xeon processors. The install itself takes over 2Gb and requires over 400Mb of temporary space! Like 8i, you can get by with less, especially if you’re just playing around rather than trying to do any real work. My hardware has improved since I wrote the original HOWTO. I still have the same Celeron 466Mhz processor but I’m now up to 384Mb of memory and in addition to the original 8Gb drive I now have a 120Gb disk mainly dedicated to /home.

This configuration does work, but it’s clearly not optimal. Installation took quite some time and creating a new database was painful.

If you don’t believe me, listen to Philippe Andersson: “I monitored the box closely (through xosview) during the database creation phase (which lasted for over an hour, BTW), and the RAM + swap used topped at over 1.1 GB (while the average system load peaked at 29.0) !! That’s what I call pushing the hardware to the limits!” (I didn’t see numbers anything like that high, though.) Conversely, Frits Hoogland says he managed to get it working with only 192Mb. (Brave man.)

I also now have broadband Internet access which came in very useful for downloading the 1+Gb of archives from Oracles website. That’s a lot of data! (For those that are counting, that’s more than twice the size of 8i R3.) If you pay for your bandwidth it may even be cheaper to buy those three CD’s from Oracle.

On the software front I’ve upgraded to Redhat 8. I’ve added no special other software, so if you have Java or similar installed now might be a good time to remove it from your path so the installer doesn’t get confused.

Many problems with 8i R3 were because people were using newer distributions that use GLIBC 2.2. With 9i you must have this newer version of the C library. They also stipulate the 2.4 kernel and strongly recommend SuSE. (But then they recommended RedHat previously and practically no-one took any notice.)

On with the show

With all these warnings and prerequisites, you’re probably thinking that it’s tricky. Luckily you’d be wrong. This is by far the easiest Oracle install I’ve ever done.

First it’s necessary to extract the installer from the files you downloaded from the Oracle website:

zcat Linux9i_Disk1.cpio.gz | cpio -idmv

It’s then convenient to burn them onto CD’s.

The next step is to create an oracle user and “dba” group (which “oracle” should be a member of).

That done, I inserted the first disc in my CD-ROM drive, mounted it and typed /mnt/cdrom/runInstaller. It’s probably a good idea not to change your working directory to your CD, as if you do you won’t be able to eject it when prompted.

After that I just followed the prompts; no special trickery. I just installed the default version of everything.

I did have three problems along the way. The first was a linker error, which manifested itself as “Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/”. I just clicked “Ignore”. I’m not sure what feature that means I’m missing, but I’ve not noticed anything important so far.

The final two problems relate to creating the database. I found that the “ORA-27123: unable to attach to shared memory segment.” error in fact referred to insufficient shared memory being available. Either increase the amount available (see below) or decrease the memory requirements of your database.

I also found that I couldn’t create the test/demo databases (which I assume are created just by copying some files from the CD). Not to worry: you can easily create a custom database. With hardware like mine, the process takes ages but it works with absolutely no problems.

Altering your shared memory

It used to be quite an ordeal to change the shared memory setting under Linux, but with the 2.4 kernel it’s as simple as logging in as root and typing this:

echo $((512*1024*1024)) > /proc/sys/kernel/shmmax

This gives you 512Mb of shared memory (which would be rather too much for my machine!). You’ll probably want to put that in your startup scripts.