There are few steps to be performed before the installation process. They are divided into the following categories:
Oracle 9i is a tough bit, you better have a good machine. Here is what the Installation Guide says (summary):
Parameter Required Sufficient (tested) --------------------------------------------------- CPU PII or K6 K6/2 *(1) RAM 512 MB 256 MB HDD space 3.5 GB 2.5 GB *(2) Swap space 1GB or RAMx2 512 MB or more
(1) Dual CPUs are recommended for large databases. Usually a high performance CPU couple (Xeon or Athlon MP) or even quad system is considered a good choice.
(2) Using SCSI HDD with RAID or separate HDD for each database, if multiple database instances will be installed, is recommended.
Oracle requires a minimal version of the kernel and JRE software:
Parameter Required Sufficient (tested) --------------------------------------------------- Kernel Version 2.4.7 later is fine JRE 1.1.8v3 1.1.8v3
Since (and including) version 8i, the installation processes are GUI-based and built with Java, so a main requirement is X server and a Window Manager. At least the JRE version 1.1.8v3 should be installed. This installation was done with version 1.1.8v3 of JRE. I can not guarantee that other versions can do the job. Test it at your own risk.
These requirements are valid if you decide to install the Enterprise Server. For the Standard Edition the sufficient values are fine. Even in some cases these parameters could be lower.
Here is the installation environment I used for this example:
CPU K6 III /400 RAM 512 MB HDD space 2.3 GB Swap space 512 MB CD ROM 24x Kernel version 2.4.18-24.8.0 JRE 1.1.8v3
It seems that this environment is enough for testing with small database sizes, but as recommended before, if you need to use a large or very large database, choose better hardware.
The installation requires a few environment variables to be set before it starts. These variables can be set into one's profile directly by putting the lines in the .bash_profile of every account, which will be used to access the database, or in a more generic approach -- in the file /etc/profile (as this installation). Here is a simple list and example values for the variables (current example):
ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/184.108.40.206.0 ORACLE_SID=ORTD PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH
Everything so far is valid for both RedHat 8.x and 9.x, but it seems that Oracle has thought of another variable, which must be set in RedHat 9. It must be included with the previous ones and exported accordingly. It is necessary to set it if you don't want to be stuck into an infinite loop during installation:
Thanks to Steve Schladel, a colleague and a DBA, the installation continued smoothly without a problem.
The ORACLE_SID variable I set by using the abbreviation of ORacle Test Database. It is up to you what you will set as SID. This will be your default database name and part of the global database name.
For more information on the meanings of the variables, please refer to the Oracle Administrator's Manual or Reference.
The JRE (Java Runtime Environment) can be downloaded from Blackdown website. Pick 1.1.8v3 if you don't know what to download and unpack the tarball in the /usr/local directory. This will create a directory, named after the version of the JRE. Make the following link in /usr/local/:
ln -s jre118_v3 jre
for the JRE 1.1.8v3 distribution. If a newer version is used, change the command correspondingly. Now add to the PATH variable the bin directory of your JRE:
or mix the lines here with those in the profile as you find efficient.
Before starting the installation, the Linux environment and directory structure should be prepared. There are few steps and they are listed below with a description of each step. Remember, these steps are the minimum required steps for installation of the Standard Edition. If one intends to install Enterprise and additional services, I suggest a thorough study of the Oracle 9i Installation Guide.
Log in as root and follow the list.
If the following section is not quite clear, please refer to IPC programmers reference for Linux.
>From version 2.2.1 on, the kernel has dynamically set parameters through the /proc file system and does not need to be re-compiled. For this purpose the /proc file system can be used with great flexibility. Here are the steps needed to update the kernel and set up scripts to run on boot, so that the parameters are set every time the system is booted.
Change current directory to /proc/sys/kernel.
Listed below, are the minimum required sets to be updated (if necessary).
The values of the semaphore parameters SEMMSL, SEMMNS, SEMOPM, SEMMNI can be read with the following command:
The output should be similar to:
250 32000 32 128
which is the list of values of the parameters in the above list order. Now set the values with the following command:
echo 100 32000 100 100 > sem
Shared memory parameters SHMMAX, SHMMIN, SHMMNI, SHMSEG can be read by using the following command:
where shm_param is one of shmmax, shmmin, shmmni, shmall, etc. Now use the following commands to set values for the necessary parameters:
echo 2147483648 > shmmax
echo 4096 > shmmni
echo 2097152 > shmall
The above set of commands can be combined in a shell script and can be run on boot in the run level, to decide which Oracle database will be used, but keep in mind these parameters should be set before the database instance is started up. Please refer to the Linux Administrator's guide for more information on run-levels and startup init scripts.
Set the file handles using the following commands:
echo 65536 > /proc/sys/fs/file-max
ulimit -n 65536
Set the sockets using the following command:
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
Set the process limit using the following command:
ulimit -u 16384
As with all Oracle databases, 9i requires an account for the owner, traditionally named oracle. The requirements for the groups are a bit unusual; there must be a group for OSDBA, which by default is named dba. Oracle requires also second group (usually called oinstall) to assign authority to install software. Another group for operators should also be present (but is optional), used to grant operator access to certain groups of users. So here is the sequence of commands to create the groups:
After the groups are created, we can add an account for the Oracle owner:
useradd -c DBA -g oinstall -G dba oracle
which will create the oracle account, with primary group oinstall and secondary - dba.
In addition, users who will use this database instance can be added to the dba group in the /etc/group file.
Oracle 9i installation requires a minimum of two mount points -- one for the software and one for the database files. If OFA (Optimal Flexible architecture) is used, then the minimum mount points are four -- one for the software and three (or more) for the database files.
Oracle documentation recommends each mount point to be on a separate physical disk, but for a minimal use as in this case, the mount point could be directories. The names of the mount points are traditionally /u01, /u02, /u03, etc. They can be created as subdirectories anywhere on the system and linked with root directory links. In my case I created the directories (only 2 of them - /u01 and /u02) under the root directory.
Here is a short list of commands to create and prepare the mount point (as root):
mkdir /u01 /u02
chown oracle.dba /u01 /u02
chmod 755 /u01 /u02
The last two commands set the ownership of the installation directories to the user authorized to install Oracle 9i, but after the installation by administrator's choice the topmost directories can be switched back to root ownership.
In most cases the umask should be set to 0022. When installing Oracle databases it is recommended that the umask is checked and set to 0022 if not set properly. This will ensure that all the files during the installation are created with proper attributes. Use the following commands:
to test the mask, and:
to set the mask. This command can also be set on the profile in case it isn't the default value of 0022.
Before starting the installation log in as user oracle in an X terminal and make sure that the DISPLAY and PATH variables contain the proper values. The DISPLAY variable should specify the name, server number and the screen number of the system, and where the Oracle Universal Installer will be run. This step is only necessary if you are using remote X server. In case of local installation, if you can run X Window Manager you will be able to run the installer without a problem. If there is a problem running the installer because of the DISPLAY variable, execute:
This should do the trick.
In addition as oracle user execute:
and check for all the previously mentioned environment variables. If there is a suspicion that one or more are not set properly, they should be corrected and the environment reloaded.