Install oracle9i Database on Red Hat Linux 9

Source: Internet
Author: User
Tags dba insert log mkdir linux
Oracle's article, published on Oracle's Web site, is a guide for installing oracle9i database.

Author: Abhijeet Kulkarni

Database version: Oracle9i R2 (

1. Create users and Groups:
Switch to the Root user and execute the following command

$ Su-

# Groupadd Oinstall
# Groupadd DBA
# passwd Oracle

2. Create a table of contents.
We will install everything in the/OPT/ORA9 directory:

# mkdir-p/opt/ora9/product/9.2
# mkdir/var/opt/oracle
# chown Oracle.dba/var/opt/oracle

3. Pre-installation (System configuration):

3.1 Install these compatibility libraries:


You can find these packages on the installation CD.
The first file is in the CD1 RedHat RPMS directory
The other 3 files are in the RPMS directory of CD2.

3.2 Set kernel parameters to enable successful startup:

Add these lines to the/etc/sysctl.conf
If you have more RAM, you can also change these values:

Kernel.shmmax = 536870912
Kernel.shmmni = 4096
Kernel.shmall = 2097152
Kernel.sem = 250 32000 100 128
Fs.file-max = 65536
Net.ipv4.ip_local_port_range = 1024 65000

Add these lines to the/etc/security/limits.conf

Oracle Soft Nofile 65536
Oracle Hard Nofile 65536
Oracle Soft Nproc 16384
Oracle Hard Nproc 16384

Reboot the system for these kernel changes to take effect, and if no reboot is allowed, you can change the kernel parameters at run time by executing the following commands:

# echo 32000 128 >/proc/sys/kernel/sem
# echo 536870912 >/proc/sys/kernel/shmmax
# echo 4096 >/proc/sys/kernel/shmmni
# echo 2097152 >/proc/sys/kernel/shmall
# echo 65536 >/proc/sys/fs/file-max
# echo 1024 65000 >/proc/sys/net/ipv4/ip_local_port_range

4. Pre-installation (Oracle environment):
Log on as an Oracle User:


Place the following line in ~/.BASHRC:

#oracle 9i
Export oracle_home=/opt/ora9/product/9.2
Export path= $ORACLE _home/bin: $ORACLE _home/apache/apache/bin: $PATH
Export Oracle_owner=oracle
Export oracle_sid=ora9i
Export oracle_term=vt100
Export ld_assume_kernel=2.4.1
Export Threads_flag=native
Export Ld_library_path=/opt/ora9/product/9.2/lib: $LD _library_path
Export Path=/opt/ora9/product/9.2/bin: $PATH
#根据您本国的情况更改这个 NLS Settings:
Export nls_lang= ' CROATIAN_CROATIA.EE8ISO8859P2 '

If you need additional country settings (these are Croatian), refer to the support settings here and change the Nls_lang variable accordingly.

5. Installation:

Log on as Root and allow the user Oracle to write to the X display:

Xhost +

Log on as an Oracle User:


Start the installation. Do not switch to your CD-ROM installation directory because you will not be able to remove the first CD to insert additional CDs when the system requires it.


During installation, you are prompted to insert a different installation disk. Open a new console and replace the disc with the command Umount/dev/cdrom (as Root) to remove the current platter. If REDHAT9 does not automatically install it, then use the command mount/dev/cdrom to load it

Installation will result in two errors.

* First, you will see an error dialog box that prompts you about the problem. Choose to ignore this error and we will correct it after installation.
* The second dialog box will notify you of the "Error in invoking target install of makefile $ORACLE _home/ctx/lib/".
If this error occurs, open a new console and log on as an Oracle user. Execute the following command:

$ cd $ORACLE _home/install
$ tail Make.log

You will see a line of information similar to the following:

Gcc-o ctxhx-l/opt/ora9/product/9.2/ctx/lib/-l/opt/ora9/product/9.2/lib/

Copy the row, add-ldl at the end of the line, and then run it in the $ORACLE _home/bin.

$ cd $ORACLE _home/bin
$ gcc-o ctxhx-l/opt/ora9/product/9.2/ctx/lib/

Now, click the Ignore button on the dialog box and the installation will continue.

Finally, an Oracle installation may prompt you that the agent failed to start. Select Ignore and we will change this error later.

6. Post-Installation processing
Open a console and log on as an Oracle user. Execute these commands:

$ cd $ORACLE _home/network/lib
$ make-f Install

Then edit $ORACLE _home/ctx/lib/ file and put 13-14 lines from:

ctxhx:$ (Ctxhxobj)
$ (LINK) $ (ctxhxobj) $ (inso_link)


ctxhx:$ (Ctxhxobj)
$ (LINK)-LDL $ (ctxhxobj) $ (inso_link)

And then execute

$ make-f $ORACLE _home/ctx/lib/ Install

You will now be able to start your agent with the following command

$/opt/ora9/product/9.2/bin/agentctl Start

7. Start the database
Don't worry if your installer is suspended in the last step of part 5th. Wait a while to see if it responds, or terminate it if it doesn't respond.
Add the following lines to a shell script (such as
#oracle 9i
Export Oracle_base=/home1/orahome
Export Oracle_home=/home1/orahome/ora92
Export path= $ORACLE _home/bin: $ORACLE _home/apache/apache/bin: $PATH
Export Oracle_owner=oracle
Export oracle_sid=ora9i
Export oracle_term=vt100
Export ld_assume_kernel=2.4.1
Export Threads_flag=native
Export Ld_library_path=/opt/ora9/product/9.2/lib: $LD _library_path
Export Path=/opt/ora9/product/9.2/bin: $PATH
Export ora_nls33= $ORACLE _home/ocommon/nls/admin/data

Save this file and run it at the command prompt

Now go to $ORACLE _home/bin
Edit DBCA script with any editor
$kwrite DBCA

Locate the Jre_home environment variable. It points to JDK 1.8, which is part of the installation CD. Change the variable and point it to the JDK1.3 or 1.4 of your Linux installation, and go to the end of the file, which is used to invoke the Java program. Deletes the bin directory from the path and renames the JRE executable file as a Java file. This is like invoking a Java program with our own JDK.

8. Start the database instance
Open a Sqlplus session and log on as sys/passwd as the system database administrator
Sql>create SPFile from pfile= ' full path to the '. Ora file created by the DBCA ';

Sql>shutdown immediate;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.