Zurück

Short Guide to install Oracle 9.2.0 on Red Hat Linux 7.2 / 8.0


The following short Guide shows how to install and configure Oracle 9.2.0 on RedHat Linux 7.2 / 8.0 You may download our Scripts to create a database, we suggest this way and NOT using DBASSIST. Besides these scripts, you can download our NET configuration files: LISTNER.ORA, TNSNAMES.ORA and SQLNET.ORA.

System Requirements
Create Unix Group «dba»
Create Unix User «oracle»
Setup Environment ($HOME/.bash_profile) as follows
Mount the Oracle 9i CD-ROM (only if you have the CD) ...
... or Unpacking downloaded installation files
Install with Installer in interactive mode
Create the Database
Create your own DB-Create Script (optional)
Start Listener
Automatically Start / Stop the Database
Setup Kernel Parameters ( if necessary )
Install Oracle Options (optional)
Download Scripts for RedHat Linux 7.2

For our installation, we used the following ORACLE_HOME AND ORACLE_SID, please adjust these parameters for your own environment.

  • ORACLE_HOME = /opt/oracle/product/9.2.0

  • ORACLE_SID = VEN1


System Requirements

Oracle 9i needs Kernel Version 2.4 and glibc 2.2, which is included in RedHat Linux 7.2.

Component

Check with ...

... Output

Liunx Kernel Version 2.4

rpm -q kernel

kernel-2.4.7-10

System Libraries

rpm -q glibc

glibc-2.2.4-19.3

Proc*C/C++

rpm -q gcc

gcc-2.96-98

Create Unix Group «dba»

$ groupadd -g 400 dba

Create Unix User «oracle»

$ useradd -u 400 -c "Oracle Owner" -d /home/oracle \
  -g "dba" -m -s /bin/bash oracle

Setup Environment ($HOME/.bash_profile) as follows

# Setup ORACLE environment

ORACLE_HOME=/opt/oracle/product/9.2.0; export ORACLE_HOME
ORACLE_SID=VEN1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_OWNER=oracle; export ORACLE_OWNER
TNS_ADMIN=/home/oracle/config/9.2.0; export TNS_ADMIN
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH

### see JSDK: export CLASSPATH

# Set up JAVA and JSDK environment:


export JAVA_HOME=/usr/local/jdk
export JSDK_HOME=/usr/local/jsdk
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JSDK_HOME/lib/jsdk.jar
export CLASSPATH


# Set up the search paths:

PATH=$POSTFIX/bin:$POSTFIX/sbin:$POSTFIX/sendmail
PATH=$PATH:/usr/local/jre/bin:/usr/local/jdk/bin:/bin:/sbin:/usr/bin:/usr/sbin
PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin:/usr/local/jsdk/bin
PATH=$PATH:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
PATH=$PATH:/usr/local/samba/bin
export PATH

Mount the Oracle 9i CD-ROM (only if you have the CD) ...

Mount the CD-ROM as user root.

$ su root
$ mkdir /cdrom
$ mount -t iso9660 /dev/cdrom /cdrom
$ exit

... or Unpacking downloaded installation files

If you downloaded database installation files from Oracle site (Linux9i_Disk1.cpio.gz, Linux9i_Disk2.cpio.gz and Linux9i_Disk3.cpio.gz) gunzip them somewhere and you'll get three .cpio files. The best way to download the huge files is to use the tool GetRight ( http://www.getright.com/ )

$ cd <somewhere>
$ cpio -idmv < Linux9i_Disk1.cpio
$ cpio -idmv < Linux9i_Disk2.cpio
$ cpio -idmv < Linux9i_Disk3.cpio

Now you should have three directories (Disk1, Disk2 and Disk3) containing installation files.

Install with Installer in interactive mode

Install Oracle 9i with Oracle Installer

$ cd Disk1
$ DISPLAY=<Any X-Window Host>:0.0
$ export DISPLAY
$ ./runInstaller

Answer the questions in the Installer, we use the following install directories

Inventory Location: /opt/oracle/product/oraInventory
Oracle Universal Installer in: /opt/oracle/product/oui
Java Runtime Environment in: /opt/oracle/product/jre/1.1.8

Edit the Database Startup Script /etc/oratab

VEN1:/opt/oracle/product/9.2.0:Y

Create the Database

Edit and save the CREATE DATABASE File initVEN1.sql in $ORACLE_HOME/dbs, or create a symbolic-Link from $ORACLE_HOME/dbs to your Location.

$ cd $ORACLE_HOME/dbs
$ ln -s /home/oracle/config/9.2.0/initVEN1.ora initVEN1.ora
$ ls -l

initVEN1.ora -> /home/oracle/config/9.2.0/initVEN1.ora

First start the Instance, just to test your initVEN1.ora file for correct syntax and system resources.

$ cd /home/oracle/config/9.2.0/
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup nomount
SQL> shutdown immediate

Now you can create the database

SQL> @initVEN1.sql
SQL> @shutdown immediate
SQL> startup

Check the Logfile: initVEN1.log

Create your own DB-Create Script (optional)

You can generate your own DB-Create Script using the Tool: $ORACLE_HOME/bin/dbca

Start Listener

$ lsnrctl start LSNRVEN1

Automatically Start / Stop the Database

To start the Database automatically on Boot-Time, create or use our Startup Scripts dbora and lsnrora (included in ora_config_linux_901.tar.gz), which must be installed in /etc/rc.d/init.d. Create symbolic Links from the Startup Directories in /etc/rc.d (e.g. /etc/rc.d/rc2.d).

lrwxrwxrwx 1 root root S99dbora -> ../init.d/dbora*
lrwxrwxrwx 1 root root S99lsnrora -> ../init.d/lsnrora*

Setup Kernel Parameters ( if necessary )

Oracle9i uses UNIX resources such as shared memory, swap space, and semaphores extensively for interprocess communication. If your kernel parameter settings are insufficient for Oracle9i, you will experience problems during installation and instance startup. The greater the amount of data you can store in memory, the faster your database will operate. In addition, by maintaining data in memory, the UNIX kernel reduces disk I/O activity.

Use the ipcs command to obtain a list of the system’s current shared memory and semaphore segments, and their identification number and owner. You can modify the kernel parameters by using the /proc file system.

To modify kernel parameters using the /proc file system:

1. Log in as root user.

2. Change to the /proc/sys/kernel directory.

3. Review the current semaphore parameter values in the sem file using the cat or more utility

# cat sem

The output will list, in order, the values for the SEMMSL, SEMMNS, SEMOPM, and SEMMNI parameters. The following example shows how the output will appear.

250 32000 32 128

In the preceding example, 250 is the value of the SEMMSL parameter, 32000 is the value of the SEMMNS parameter, 32 is the value of the SEMOPM parameter, and 128 is the value of the SEMMNI parameter.

4. Modify the parameter values using the following command:

# echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value > sem

In the preceding command, all parameters must be entered in order.

5. Review the current shared memory parameters using the cat or more utility.

# cat shared_memory_parameter

In the preceding example, the shared_memory_parameter is either the SHMMAX or SHMMNI parameter. The parameter name must be entered in lowercase letters.

6. Modify the shared memory parameter using the echo utility. For example, to modify the SHMMAX parameter, enter the following:

# echo 2147483648 > shmmax

7. Write a script to initialize these values during system startup and include the script in your system init files. Refer to the following table to determine if your system shared memory and semaphore kernel parameters are set high enough for Oracle9i. The parameters in the following table are the minimum values required to run Oracle9i with a single database instance. You can put the initialization in the file /etc/rc.d/rc.local

# Setup Kernel Parameters for Oracle 9i

echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 2147483648 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni

Install Oracle Options (optional)

You may want to install the following Options:

  • Oracle JVM
  • Orcale XML
  • Oracle Spatial
  • Oracle Ultra Search
  • Oracle OLAP
  • Oracle Data Mining
  • Example Schemas

Run the following script install_options.sh to enable this options in the database. Before running this scripts adjust the initSID.ora paramaters as follows for the build process. After this, you can reset the paramters to smaller values.

parallel_automatic_tuning = false
shared_pool_size = 200000000
java_pool_size = 100000000

$ ./install_options.sh

Download Scripts for RedHat Linux 7.2

These Scripts can be used as Templates. Please note, that some Parameters like ORACLE_HOME, ORACLE_SID and PATH must be adjusted on your own Environment. Besides this, you should check the initSID.ora Parameters for your Database (Size, Archivelog, ...)

Click here for the download (ora_config_linux_920.tar.gz)