329 lines
12 KiB
HTML
329 lines
12 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Oracle 9i under RedHat Linux 8.x and 9.x - Simple Installation HOWTO: Pre-installation</TITLE>
|
|
<LINK HREF="Oracle-9i-RH8-and-RH9-HOWTO-4.html" REL=next>
|
|
<LINK HREF="Oracle-9i-RH8-and-RH9-HOWTO-2.html" REL=previous>
|
|
<LINK HREF="Oracle-9i-RH8-and-RH9-HOWTO.html#toc3" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Oracle-9i-RH8-and-RH9-HOWTO-4.html">Next</A>
|
|
<A HREF="Oracle-9i-RH8-and-RH9-HOWTO-2.html">Previous</A>
|
|
<A HREF="Oracle-9i-RH8-and-RH9-HOWTO.html#toc3">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s3">3. Pre-installation</A></H2>
|
|
|
|
<P>There are few steps to be performed before the installation process.
|
|
They are divided into the following categories:
|
|
<H2><A NAME="ss3.1">3.1 System Requirements</A>
|
|
</H2>
|
|
|
|
<H3>Hardware requirements</H3>
|
|
|
|
<P>Oracle 9i is a tough bit, you better have a good machine. Here is
|
|
what the Installation Guide says (summary):
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
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
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>(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.
|
|
<P>(2) Using SCSI HDD with RAID or separate HDD for each database, if
|
|
multiple database instances will be installed, is recommended.
|
|
<H3>Software requirements</H3>
|
|
|
|
<P>Oracle requires a minimal version of the kernel and JRE software:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
Parameter Required Sufficient (tested)
|
|
---------------------------------------------------
|
|
Kernel Version 2.4.7 later is fine
|
|
JRE 1.1.8v3 1.1.8v3
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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.
|
|
<P>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.
|
|
<H3>De-facto installation environment</H3>
|
|
|
|
<P>Here is the installation environment I used for this example:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
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
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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.
|
|
<H2><A NAME="ss3.2">3.2 Environment variables and profiles</A>
|
|
</H2>
|
|
|
|
<P>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 <B>.bash_profile</B> of every account, which will be
|
|
used to access the database, or in a more generic approach -- in the file
|
|
<B>/etc/profile</B> (as this installation). Here is a simple list and
|
|
example values for the variables (current example):
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
|
|
ORACLE_BASE=/u01/app/oracle
|
|
ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.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
|
|
</PRE>
|
|
<HR>
|
|
<P>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:
|
|
<P>
|
|
<HR>
|
|
<PRE>
|
|
LD_ASSUME_KERNEL=2.4.1
|
|
</PRE>
|
|
<HR>
|
|
<P>
|
|
<P>Thanks to Steve Schladel, a colleague and a DBA, the installation
|
|
continued smoothly without a problem.
|
|
<P>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.
|
|
<P>For more information on the meanings of the variables, please refer
|
|
to the Oracle Administrator's Manual or Reference.
|
|
<H2><A NAME="ss3.3">3.3 JRE</A>
|
|
</H2>
|
|
|
|
<P>The JRE (Java Runtime Environment) can be downloaded from
|
|
<A HREF="http://www.blackdown.org">Blackdown website</A>. 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/:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>ln -s jre118_v3 jre</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>PATH=$PATH:/usr/local/jre/bin<BR>
|
|
export $PATH</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>or mix the lines here with those in the profile as you find efficient.
|
|
<H2><A NAME="ss3.4">3.4 Setup tasks to perform as root user</A>
|
|
</H2>
|
|
|
|
<P>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.
|
|
<P>Log in as root and follow the list.
|
|
<H3>Kernel Tune-up</H3>
|
|
|
|
<P>If the following section is not quite clear, please refer to IPC
|
|
programmers reference for Linux.
|
|
<P>>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.
|
|
<P>Change current directory to /proc/sys/kernel.
|
|
<P>Listed below, are the minimum required sets to be updated (if necessary).
|
|
<H3>Read and set the semaphore parameters</H3>
|
|
|
|
<P>The values of the semaphore parameters SEMMSL, SEMMNS, SEMOPM, SEMMNI
|
|
can be read with the following command:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>cat sem</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>The output should be similar to:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>250 32000 32 128</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>which is the list of values of the parameters in the above list order.
|
|
Now set the values with the following command:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>echo 100 32000 100 100 > sem</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<H3>Read and set the shared memory parameters</H3>
|
|
|
|
<P>Shared memory parameters SHMMAX, SHMMIN, SHMMNI, SHMSEG can be read
|
|
by using the following command:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>cat shm_param</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>where shm_param is one of shmmax, shmmin, shmmni, shmall, etc. Now use
|
|
the following commands to set values for the necessary parameters:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>echo 2147483648 > shmmax<BR>
|
|
echo 4096 > shmmni<BR>
|
|
echo 2097152 > shmall</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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
|
|
<EM>before</EM> the database instance is started up. Please refer to
|
|
the Linux Administrator's guide for more information on run-levels and
|
|
startup init scripts.
|
|
<H3>File handles</H3>
|
|
|
|
<P>Set the file handles using the following commands:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>echo 65536 > /proc/sys/fs/file-max<BR>
|
|
ulimit -n 65536</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<H3>Sockets</H3>
|
|
|
|
<P>Set the sockets using the following command:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<H3>Process Limit</H3>
|
|
|
|
<P>Set the process limit using the following command:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>ulimit -u 16384</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<H3>Groups and accounts</H3>
|
|
|
|
<P>As with all Oracle databases, 9i requires an account for the owner,
|
|
traditionally named <B>oracle</B>. The requirements for
|
|
the groups are a bit unusual; there must be a group for OSDBA, which
|
|
by default is named <B>dba</B>. Oracle requires also second group
|
|
(usually called <B>oinstall</B>) 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:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>groupadd dba<BR>
|
|
groupadd oinstall<BR>
|
|
groupadd oper</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>After the groups are created, we can add an account for the Oracle owner:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>useradd -c DBA -g oinstall -G dba oracle</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>which will create the <B>oracle</B> account, with primary group
|
|
<B>oinstall</B> and secondary - <B>dba</B>.
|
|
<P>In addition, users who will use this database instance can be
|
|
added to the dba group in the /etc/group file.
|
|
<H3>Mount points and permissions</H3>
|
|
|
|
<P>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.
|
|
<P>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.
|
|
<P>Here is a short list of commands to create and prepare
|
|
the mount point (as root):
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>mkdir /u01 /u02<BR>
|
|
chown oracle.dba /u01 /u02<BR>
|
|
chmod 755 /u01 /u02</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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.
|
|
<H3>Permissions for file creation</H3>
|
|
|
|
<P>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:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>umask</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>to test the mask, and:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>umask 0022</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>to set the mask. This command can also be set on the profile in case
|
|
it isn't the default value of 0022.
|
|
<H2><A NAME="ss3.5">3.5 Setup tasks to perform as <B>oracle</B> user</A>
|
|
</H2>
|
|
|
|
<P>Before starting the installation log in as user <B>oracle</B> 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:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>xhost +localhost<BR>
|
|
export DISPLAY=localhost:0.0</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>This should do the trick.
|
|
<P>In addition as <B>oracle</B> user execute:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<B>env</B>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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.
|
|
<HR>
|
|
<A HREF="Oracle-9i-RH8-and-RH9-HOWTO-4.html">Next</A>
|
|
<A HREF="Oracle-9i-RH8-and-RH9-HOWTO-2.html">Previous</A>
|
|
<A HREF="Oracle-9i-RH8-and-RH9-HOWTO.html#toc3">Contents</A>
|
|
</BODY>
|
|
</HTML>
|