Next Previous Contents

2. Starting off

2.1 Overview

In this section, we'll set up Linux so that you're in a position to get Oracle 8i from the CD that they sent you into your hard-disk. (If they didn't send you a disc and you're working from a tar-ball that you downloaded from the Internet, don't worry. The installation process is identical.)

The Oracle installation process begins when you've built your PC, installed Linux, configured it and connected it to your network.

2.2 Prerequisites

Your brain

This may sound like a very silly prerequisite, but I do mean it although not necessarily in the same way you might be thinking just now. There are two main problems.

Firstly, both Oracle and Linux change very frequently. This is a good thing in that bugs and security holes gets fixed quickly and there are always new and exciting enhancements to play with and, with luck, solve the problems we're actually paid to solve. The bad news is that no matter how much effort I put into this document it'll never be completely up to date.

The onus is, therefore, on you to engage brain. Sometime Oracle change small things. The dialog used to say "OK" but now says "Okay", or the screens are in a slightly different order, or... well, it could be any number of things. There's no way I can keep up on all the changes like that, just like there's no way that I can provided detailed guides for every version of Oracle running on every possible Linux distribution.

Or it could be the big, complex things, like when RedHat Linux 7 first came out with new C libraries and a slightly non-standard C compiler. You could apply the first point here, applying your brain, reading the release notes, the RedHat website and Oracle Technet but you'd be spending more time than you need to be. The reason is problem number two: the culture clash.

In the case of Linux, newer is better. People frequently upgrade their OS to the latest and greatest and it's certainly not unusual to add or upgrade individual packages to something more familiar or more powerful. This is not how things are done in the world of Oracle. Companies are still running Oracle 6, software that has been available for more than ten years. (Oracle have not supported this for quite some time, so this isn't terribly smart.) People here value stability and change, so loved by many Linux die-hards, is the complete antithesis of it.

The trick to applying this to installing Oracle 8i on your Linux box is to read the release notes. If they recommend RedHat Linux 6, as they did for Oracle 8i 8.1.5, this is the distribution that you should use unless there's a very good reason to do otherwise. The same for any other requirements they state: their hardware and software requirements have, to date, been pretty accurate.

Hardware

I think that the most important part of the prerequisites is not to underestimate them. Oracle is a very big and complex application and you won't get the best out of it if you skimp too much on the hardware.

My biggest mistake was to assume that Oracle were joking when they said that you need 128Mb of RAM. I've installed Oracle a couple of times on Sun servers with that much, why would I need more on a CISC machine?

Believe Oracle not my gut. My machine with 32Mb of Ram ground on for less than half an hour before I realised that it was hopeless.

I was trying to use the bare minimum of hardware, and that's generally a bad idea. If you can't afford the hardware you certainly won't be able to afford the licences!

Things to look for on a production server are many disks, possibly RAIDed, and fast CPU's. Database access is relatively easy to break down into smaller parallel phases so having a number of processors really does help.

On the other hand, any machine that can run Linux and that has enough memory should be in with a chance. My other machine, the one I used for the rest of this document, is fine as a development machine. It is a Celeron 466Mhz with 128Mb of memory, an 8Gb hard disk, an Intel graphics card and a DM9102 network card.

2.3 Linux setup

Choice of distribution

Oracle seem to have done most of their development on RedHat Linux 6.0. For a fuss-free installation, using RedHat is an excellent idea. Using version 6.2 with all the patches will be the easiest. For RedHat Linux 7 and later refer to my website. Depending on how you've installed your operating system there may be extra steps required.

I've heard horror stories about trying to get it installed on other distributions. However, as a general rule, anything like RedHat should also do the trick. A recent version of Mandrake should be fine and SuSE, in fact, are fairly active in supporting Oracle and have a web page dedicated to the task.

The further you get from RedHat the more problems you can expect.

Distribution Setup

Now that you've decided on which RedHat-like distribution you're going to use, you'll need to work out which options to set and which of the vast number of packages need to be installed to make Oracle work.

Firstly you need two to three times the amount of memory you have for your swap space. (You'll need around 200Mb of memory, real or virtual, just to run the installer!) Note that contrary to popular opinion, Linux swap partitions can be larger than 128Mb.

The arrangements of your other partitions can also be important. Make sure that the Oracle software is on a different partition to your operating system, and make sure that the Oracle data-files are on yet another partition. The idea here is to make sure that your data-files do not get fragmented. (In a live environment, you're likely to have a number of disk with Oracle spread across them. There are a number of good books that you consult for more information on this.) Also, make sure you have at least 400Mb free in /tmp and that it's not on the root filesystem.

As for the software, I took the easy option and installed just about everything. You certainly need all the 'base' packages, X Windows (the installation routine is a Java GUI) and the development tools regardless of whether you intend doing any coding or not. Compared to the size of Oracle and your databases a Linux distribution is tiny, probably less than a gigabyte. It's worth installing it all for an easy life!

Kernel parameters

The documentation suggests that you make changes to the Linux kernel so you can get more shared memory. Since I was only planning on running a very small database, I assumed everything would be okay and decided to go ahead with the installation anyway. The default RedHat Linux settings worked, although you may have to change them for a larger development or production system.

Note that some people have had to recompile the kernel to get Oracle to work at all. I guess it must depend on the other software that you're running on the same machine.

Follow the instructions in the Oracle documentation (on the installation CD in HTML format) and the Linux Kernel HOWTO to build your new kernel.

Users and groups

Using LinuxConf (or whatever other method you feel comfortable with), you need to add a new group called "dba" and a new user called "oracle", which should belong to your newly created "dba" group.

You can make any other user a DBA by putting them in the DBA group. If you have several DBA's this is probably a good idea for auditing purposes.

Installing the right Java Virtual Machine

Oracle were obviously stung by Java on their first release. All full release of 8i since 8.1.6 have included their own virtual machine so you don't need to get your own. In fact, make sure that you remove any reference to Java you currently have (you don't need to delete it, just remove it from your PATH and make sure that no other variable, such as JAVA_HOME or CLASSPATH, are set). The installer is temperamental enough without adding more variables.

If you're installing 8.1.5, read on:

If you check the official documentation, you'll find that Oracle recommend the Blackdown Java Runtime Environment version 1.1.6v5. That's what they mean. Don't think 'newer versions will be less buggy' as the installer probably won't work. And don't think, 'I'll be developing software so I'll just get the JDK,' as that won't work either.

There is one caveat to using this version of the JRE: the Oracle installer seems to be hard-coded to expect the JRE executable to be at /usr/local/jre/bin/jre. While this is inconvenient, it does not mean that you have to install it there.

I performed the following steps to get a working copy of the JRE:

  1. Download the Java Runtime Environment from the Blackdown website
  2. Move to where you want to install the JRE:
    cd /usr/local
    
  3. Uncompress the archive:
    bzip2 -d -c jre-1.1.6-v5-glibc-x86.tar.bz2 | tar xvf -
    
  4. Create a symbolic link between where Oracle thinks it is and where it actually is:
    ln -s jre116_v5 jre
    

2.4 Starting off questions and answers

Do I really need 128Mb RAM?

I would recommend that you do use 128Mb of RAM or more. I think it would be difficult to get any serious work done with less.

However, if you disable the Java option and set all the shared memory settings to be relatively small, there's no reason why it shouldn't work. I've heard success stories with 64Mb. You're probably not going to get away with 32Mb, though.

There is a caveat. You may only need half of what Oracle recommends to run the thing, but to install it their number starts to make sense. I've heard reports of the installer using 150Mb of memory and I've seen it well over 120Mb myself. If you have 64Mb or less of memory, make sure you have lots of swap space and patience.

An alternative if you absolutely can't add more memory: install Oracle on another, bigger machine and copy across the $ORACLE_HOME directory. You'll need to make sure that you have all the same users and groups (preferably with the same numeric codes) and take special care with SUID executables like $ORACLE_HOME/bin/oracle.

Does it work with Debian/SuSE/Mandrake/some other distribution?

Oracle specify the Linux kernel version 2.2 or above and GLIBC version 2.1 with any window manager. In theory, any distribution that meets these requirements should work.

In practice, unless Oracle have certified you distribution they may not support it and you may have more problems trying to complete the installation. Unless you have a very good reason to do otherwise I suggest you stick to RedHat Linux 6.x with all the patches you can get hold of.

For the record, I've heard success stories will all those distributions. Some, however, consistently cause problems, Slackware being the main culprit.

Does it work with GLIBC 2.2 distributions?

At the moment, RedHat Linux 7.x and other distributions based on GLIBC 2.2 are known to be fairly problematic. It is possible to make it work, however. To avoid "clutter" in this document I've included the details on my website.

Does it work with development kernels?

There's no obvious reason why it shouldn't work -- I used 2.3.19 for a while because it supported my network card and the stable kernel at the time didn't -- but unless there's a pressing need it's certainly safest to stay well clear. I switched back to the stable series as soon as the driver was included.

Does it work with Linux 2.4?

The current stable kernel has a number of features and performance improvements over the 2.2.x line that Oracle could benefit from. Can you use it without risking disaster? The answer is definitely "yes."

Generally the kernel is upwardly compatible with 2.2.x and I've not heard of any significant problems with any of the more recent 2.4 releases (although some of the early ones are almost certainly worth avoiding).

Does it work with Linux 2.5.x and 2.6?

At the time of writing, the 2.6 kernel is just enter its beta testing phase, so the same advice as for previous development kernels applies here too. Summary: no technical reason why you can't use them, but not recommended especially in a live environment.

Where do I get Oracle from?

Firstly, if you're brave, have a very fast Internet connection or inexhaustible patience (and unmetered access) you can download it from Oracle Technology Network. Beware: 8.1.5 is nearly 200Mb, and 8.1.7 is nearer 500Mb.

A better option is to get the CD. Oracle sometimes offer to send you a free development CD when you join Technet. It's certainly worth spending some time looking round their web site for that. Alternatively, you can buy them from the Oracle Store for around $40. It includes lots of other software too and comes on 15 discs.

What if I just want to connect to an Oracle database?

If you have an Oracle database on another machine and just want to connect to it from another Linux machine, the process is very similar to that described here but with less of the complex stuff.

Oracle tend not to distribute an Oracle Client CD for anything other than Windows. Instead you just use the same Oracle Enterprise CD and select the "Oracle Client" or "Oracle Developer" (not to be confused with the Oracle Developer product) when it asks what kind of installation you want.

All the other advice, about using the correct version of Linux, the Java distribution, etc, are all just as pertinent for the client install as for the server, since the same installer is used.


Next Previous Contents