Category Archives: Oracle Howto

My guides on installing Oracle on Linux.

Installing Oracle 8i R3

I have recently installed Oracle 8i R3 (8.1.7) on my Celeron 466 machine. I found the installation to be very straight-forward compared with both 8.1.5 and the experiences of many people.

My machine is well below the specification that would be required to do real work on, especially if you have a number of developers. It does work, albeit rather slowly. Creating my initial database, for example, took around eight hours.

It currently runs RedHat 7.2 with a few minor patches (including a more recent kernel). I installed just about everything, including the full development kit and “glibc-compat”.

My secret to success, I believe, were these two commands:

  1. . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
  2. export LD_ASSUME_KERNEL=2.2.5

After this, the installation ran exactly to plan.

Installing Oracle on Redhat 7

Introduction

The subject at hand is really much wider than just Redhat 7.x, especially as more recent distributions are following Redhats lead and are now including glibc 2.2 also. I have no reason to believe that this process will not work with newer versions of SuSE, Debian, etc.

The other point to note is that I have not tried the procedure outlined here. I have migrated my box from Debian 2.2 to RedHat 7.2 and can testify that Oracle still works, but I have not actually performed an installation. I have, however, recieved a good number of emails confirming that it works, so don’t worry!

Most of the following material comes from two people, who are the real people you should thank if it works for you. They are John Smiley and Max McClanahan.

The process

The problem is that Oracle 8.1.x needs glibc 2.1.3. It will link without error with glibc 2.2, but when you try to run dbassist or create a database from scratch, there are problems (dbassist hangs, ‘End of file on communication channel’, etc.)

Here is a step-by-step process for getting Oracle 8.1.6 or 8.1.7 working on systems with glibc 2.2 (don’t bother with 8.1.5 if you can help it). Note that 9i requires glibc 2.2 and will not work with earlier versions:

  1. Install the compat-glibc RPM for 2.1.3. The exact filename will vary depending on your version of RedHat or other distribution. Many people (Fernando Boaglio, Peter Whysall, Jose T. Martin Prior amongst others) have noted that Oracle provide a patch (glibc-2.1.3-stubs.tar.gz) that provides the same functionality. I prefer the RPM’s personally, but this will certainly work.
  2. Execute the following command: . /usr/i386-glib21-linux/bin/i386-glibc21-linux-env.sh
  3. Type “export LD_ASSUME_KERNEL=2.2.5”
  4. Type: cd $ORACLE_HOME/bin
  5. Run the following command from the UNIX prompt: relink all

All of the Oracle software, including the assitants, will work fine now.

This technique will work on RedHat 7.0 with the 2.2.16 kernel, as well as the 2.4.0 and 2.4.1-pre11 kernels.

The rest

John Smiley also asked me to point out that Oracle have issues some patches (ftp://205.227.44.220/server/patchsets/unix/LINUX/8161/bug1467074/) that are required in order for them to consider your machine ‘certified’:

Operating System: Intel Based Server LINUX Version:Red Hat 7.0
Oracle Server - Enterprise Edition Version: 8.1.7 (8i)
N/A Version: N/A
Status: Certified
Oracle Server - Enterprise Edition Version: 8.1.7 (8i)
Bug Number: 1467074
REDHAT 7.0/ORA-3113 ISSUE (GLIBC 2.1.94 AND LATER)
Patch for bug 1467074 is mandatory for this certification.

RedHat even have a bug report on this issue, which may be worth a look: Bugzilla report from Redhat.

Installing Oracle 8i R2


Introduction

Everyone will be very pleased to hear that Oracle’s third attempt at producing a usable database product on Linux has largely been successful. The first two usually worked but only after much aggravation. Forget all the extras that 8.1.6 provides, you can get the thing installed with much less grief!

Of course, I wouldn’t go so far as to say that it was simple and straight-forward all the time. It is Oracle that we’re talking about here.

I’ll start by describing how I got Oracle installed on my box and finish off with some questions and answers, much in the same format as the HOWTO. It’s probably worth having a look at the HOWTO still as many of the problems are similar and the solutions given there may give you some idea of where to start looking.

My machine

First, some news on my ‘server’ configuration: I still have the same Celeron 466 with 128Mb of memory. On the software side I’ve upgraded to Mandrake 7.1 (if I’d been running a production Oracle server I wouldn’t have taken the risk). I didn’t remove my old installation of Oracle before starting on the new one and I didn’t attempt to perform an upgrade.

I did remove JRE (Blackdown 1.1.6v5) and my installation of JDK (1.2.2) from my path. Oracle now comes with its own JRE, so even having the risk of it using the wrong one made me paranoid.

The last thing to note is that this time I downloaded my copy rather than using a CD. This seems to be what most other people do, so my tale here should be closer to ‘real life.’

My successful install

The process was as follows:

  1. Download Oracle 8i R2
  2. Extract the archive
  3. Create the required users and groups
  4. Make sure X is set up correctly
  5. Start the installer
  6. Quick tests

Firstly, the download. It’s big, nearly 300Mb. Don’t attempt it without something like Gozilla or wget even if you’re on a fast corporate connection.

Secondly the extraction. You’ll find that it comes in a standard tar archive compressed with GNU Zip. This command should get all the files out:

tar zxvf oracle8161.tar.gz

When you extract it, remember that the files coming out are slightly bigger (301807K on my machine). So you need over 500Mb of disk space before you even start the installation!

Before you actually start the installation, you’ll need to switch to “root” for a couple of commands. Start by creating a group called “dba” and a user “oracle”. Your new user should be in the new group. Log in as your new “oracle” user and make sure your X Windows system is working properly. (If you can fire up a new ‘xterm’ you’re fine.) The Oracle installer, as before, works only in a graphical environment.

Go to where you extracted the software archive. You’ll find a directory has been created (“Oracle8iR2”). Move into it and you’re ready to start the installation!

(A quick note: in the same directory there’s “index.htm” which is the root page for all the Oracle installation document. This seems to be improved over earlier releases and is worth a read.)

Type:

./runInstaller

A splash screen should appear, followed by a Windows-style Wizard/Installer. I find the default options for almost everything to be fine. Broadly speaking, and assuming some common-sense is used, just clicking “Next” continually should result in a working installation. In slightly more detail…

(Note that there are a few points where the installer asks you to log in as “root” to run some shell scripts. To simplify the text below, I’ve missed these steps out. Simply do as it says and click “Retry” once it’s done.)

  1. Welcome screen. Click “Next.”
  2. File Locations screen. The top box should be correct; it displays the location of the archive containing all the software about to be installed. The second box is the “base” of you Oracle installation. I chose “/home/ora816” but this is not recommended. Have a read of the OFA (Oracle Flexible Architecture) documentation.
  3. Available Products screen. If you’re installing a server, select “Oracle 8i Enterprise Edition 8.1.6.1.0”; otherwise select “Oracle 8i Client 8.1.6.1.0”. I’m assuming that you’re building a server and click the first option.
  4. Installation Types screen. Do you want a “Typical”, “Minimal” or “Custom” installation. Unless you really know what you’re doing, pick “Typical”.
  5. Upgrading or Migrating an Existing Database screen. If you have a previous installation, Oracle will ask whether you want to upgrade your database to the new 8.1.6 format. I didn’t. I’d recommend doing this yourself once the installation process is complete even if you do.
  6. Database Identification screen. Here Oracle asks you for a Global Database Name and a SID. As before, this is something your DBA probably has an opinion on. If you’re the DBA and you don’t know what it’s asking for, enter “dev1” for both.
  7. Database File Location screen. Now Oracle knows what you want to call your database, it asks you where you want to put all the files that make up the database. Think back to your reading of the OFA documentation for this.
  8. Summary screen. Oracle now tells you what it’s planning on installing. Click “Install” if you’re sure, or go to the “Previous” screen an juggle the options around.
  9. Configuration Tools. First Oracle runs the Net8 Configuration Assistant and then runs the Database Configuration Assistant. Basically, it sets up your networking and creates the database you asked for. No user intervention is required. (Note: the SYS account password is “change_on_install” and the SYSTEM password is “manager”. You should change both using the SQL*Plus “password” command as soon as possible.)
  10. End of Installation. That’s it, you have a complete installation!

If you want to install Oracle Programmer (Pro*C, etc), you need to follow the same process as before: go back through the installation process, but this time following the “Oracle Client” route. The rest of the process is similar to the above and very straight-forward. The new installer even asks you if you want to start again once your database has been created.

And if you want to set up a network connection to another machine, the process is exactly the same as for Oracle 8i (and is covered in the main HOWTO).

Questions and answers

Java problems?

As before, many of the problems come from your choice of Java Virtual Machine. R2 actually comes with a runtime environment this time (JRE 1.1.8), which does make things easier. However I have heard reports that older versions sometimes work better. The older version is normally Blackdown’s 1.1.6v5 release, the same Oracle used to recommend with their 8.1.5 release.

Memory requirements

One thing that is exactly the same is the amount of memory required. I don’t remember seeing a figure in their old documentation, but they say you need 400Mb this time, either real or virtual, for 8.1.6. I have 384Mb in total on my machine and it was fine. The default database configuration seems to use more memory but, as always, you can change that.

Running Redhat 7 or another glibc 2.2 based distribution

Short answer: add “export LD_ASSUME_KERNEL=2.2.5” to your profile and then type “. /usr/i386-glib21-linux/bin/i386-glibc21-linux-env.sh”.

Long answer: look at my page on the subject.