Installing Oracle9i (9.2.0.4.0) on Red Hat Linux (Fedora Core 1)

Steps for installing Oracle9i (9.2.0) on Red Hat Linux Fedora Core 1.

Jeff Hunter

Jeff Hunter is a SearchOracle.com guest contributor. Jeff is a senior DBA and author. He specializes in advanced

performance tuning, Java programming, capacity planning, database security and physical/logical database design in a UNIX, Linux and Windows NT environments.

You can find more of Jeff's work at www.iDevelopment.info.

TABLE OF CONTENTS
   Overview
   Swap space considerations
   Install the Java Development Kit (JDK)
   Create Oracle account and directories
   Update JRE_LOCATION for Installer
   Downloading/unpacking the Oracle9i installation files
   Update Red Hat Linux System - (Oracle Metalink Note: 252217.1)
   Install the Oracle 9.2.0.1.0 RDBMS software
   Install the Oracle Universal Installer 2.2.0.18.0
   Install the Oracle 9.2.0.4.0 Patchset
   Post installation
   Configuration files/scripts


Overview
[ Return to Table of Contents ]

The following article is a summary of the steps required to successfully install the Oracle9i (9.2.0.4.0) RDBMS software on Red Hat Linux Fedora Core 1. Keep in mind the following assumptions throughout this article:

  • When installing Red Hat Linux Fedora Core 1, I install ALL components (everything). This makes it easier than trying to troubleshoot missing software components.
  • The ORACLE_SID of the database to be created is O920DB.
  • You will install the Oracle 9.2.0.1.0 RDBMS software while ignoring all errors. This will obviously be an unsuccessful install of the Oracle software. All of the errors that occur during the install of the Oracle 9.2.0.1.0 software will be resolved later using the Oracle 9.2.0.4.0 patchset.
  • You will need to obtain the Oracle 9.2.0.4.0 patchset from MetaLink. The patchset is (patch# 3095277) and is approximately 318 MB.
  • After installing the Oracle 9.2.0.1.0 RDBMS software (even though there were errors that we ignored), we will then need to install the "Oracle Universal Installer 2.2.0.18.0," which is contained in the Oracle 9.2.0.4.0 patchset.
  • After installing (updating) the Oracle Universal Installer 2.2.0.18.0, you will then need to install the Oracle 9.2.0.4.0 patchset.
  • There will then be several steps in the post installation section that will include the instructions for manually editing and compiling the errors noticed earlier.


Swap space considerations
[ Return to Table of Contents ]

  • Installing Oracle9i requires a minimum of 512 MB of memory. (An inadequate amount of swap during the installation will cause the Oracle Universal Installer to either "hang" or "die.")
  • To check the amount of memory / swap you have allocated, type either:
  • # free

    - OR -

    # cat /proc/swaps

    - OR -

    # cat /proc/meminfo | grep MemTotal

  • If you have less than 512 MB of memory (between your RAM and SWAP), you can add temporary swap space by creating a temporary swap file. This way you do not have to use a raw device or even more drastic, rebuild your system.

    As root, make a file that will act as additional swap space, let's say about 300 MB:
    # dd if=/dev/zero of=tempswap bs=1k count=300000

    Now we should change the file permissions: # chmod 600 tempswap

    Finally we format the "partition" as swap and add it to the swap space:
    # mke2fs tempswap # mkswap tempswap # swapon tempswap



Install the Java Development Kit (JDK)
[ Return to Table of Contents ]

You will need to download the appropiate SDK from Sun. The installation of Sun's JDK 1.3.1 is only required for Java clients like the Oracle Universal Installer, DBCA, NETCA, etc.

As per the JDK documentation, install JDK under /usr/local.
Then create a symbolic link to the JDK under /usr/local/java.

  • Sun's SDK 1.3.1
  • Download from: http://java.sun.com/j2se/1.3/download.html

    Download the "Linux self-extracting file / SDK" option. (I still don't trust or use RPMs.)

    Install as root:

      # cp j2sdk-1_3_1_10-linux-i586.bin /usr/local
      # cd /usr/local
      # chmod 755 j2sdk-1_3_1_10-linux-i586.bin
      # ./j2sdk-1_3_1_10-linux-i586.bin
      # ln -s /usr/local/jdk1.3.1_10 /usr/local/java
      # rm j2sdk-1_3_1_10-linux-i586.bin



Create Oracle account and directories
[ Return to Table of Contents ]

Create Oracle's Home Directories:
# mkdir /u01
# mkdir /u01/app
# mkdir /u01/app/oracle
# mkdir /u01/app/oracle/admin
# mkdir /u01/app/oracle/admin/O920DB
# mkdir /u01/app/oracle/admin/O920DB/adhoc
# mkdir /u01/app/oracle/admin/O920DB/adump
# mkdir /u01/app/oracle/admin/O920DB/arch
# mkdir /u01/app/oracle/admin/O920DB/backups
# mkdir /u01/app/oracle/admin/O920DB/bdump
# mkdir /u01/app/oracle/admin/O920DB/cdump
# mkdir /u01/app/oracle/admin/O920DB/create
# mkdir /u01/app/oracle/admin/O920DB/dba
# mkdir /u01/app/oracle/admin/O920DB/exp
# mkdir /u01/app/oracle/admin/O920DB/logbook
# mkdir /u01/app/oracle/admin/O920DB/pfile
# mkdir /u01/app/oracle/admin/O920DB/release
# mkdir /u01/app/oracle/admin/O920DB/report
# mkdir /u01/app/oracle/admin/O920DB/tuning
# mkdir /u01/app/oracle/admin/O920DB/udump
# mkdir /u01/app/oracle/product

Create Oracle user account:
# groupadd -g 115 dba
# useradd -u 173 -c "Oracle Software Owner" -d /u01/app/oracle -g "dba" -m -s /bin/bash oracle
# passwd oracle

Create Oracle directories:

# chown -R oracle:dba /u01/app/oracle

# mkdir /u03
# mkdir /u03/app
# mkdir /u03/app/oradata
# mkdir /u03/app/oradata/O920DB
# chown -R oracle:dba /u03/app/oradata

# mkdir /u04
# mkdir /u04/app
# mkdir /u04/app/oradata
# mkdir /u04/app/oradata/O920DB
# chown -R oracle:dba /u04/app/oradata

# mkdir /u05
# mkdir /u05/app
# mkdir /u05/app/oradata
# mkdir /u05/app/oradata/O920DB
# chown -R oracle:dba /u05/app/oradata

# mkdir /u06
# mkdir /u06/app
# mkdir /u06/app/oradata
# mkdir /u06/app/oradata/O920DB
# chown -R oracle:dba /u06/app/oradata

# mkdir /u07
# mkdir /u07/app
# mkdir /u07/app/oradata
# mkdir /u07/app/oradata/O920DB
# chown -R oracle:dba /u07/app/oradata

# mkdir /u08
# mkdir /u08/app
# mkdir /u08/app/oradata
# mkdir /u08/app/oradata/O920DB
# chown -R oracle:dba /u08/app/oradata

# mkdir /u09
# mkdir /u09/app
# mkdir /u09/app/oradata
# mkdir /u09/app/oradata/O920DB
# chown -R oracle:dba /u09/app/oradata

# mkdir /u10
# mkdir /u10/app
# mkdir /u10/app/oradata
# mkdir /u10/app/oradata/O920DB
# chown -R oracle:dba /u10/app/oradata

# mkdir /opt/bin
# chown oracle:dba /opt/bin

Oracle environment variable settings:

An example ".bash_profile" is provided in the configuration files/scripts section below.

Ensure to set the environment variable: LD_ASSUME_KERNEL=2.4.1

NOTE: Failing to set the LD_ASSUME_KERNEL parameter will cause the Oracle Universal Installer to hang!


Update JRE_LOCATION for Installer
[ Return to Table of Contents ]

    Edit the JRE_LOCATION setting in the file: /Disk1/install/linux/oraparam.ini to point to the location of your Java 1.3.1 installation. If you installed the Java JDK as I did (with the symbolic link /usr/local/java) then your entry for JRE_LOCATION will look as follows:

    ...
    JRE_LOCATION=/usr/local/java
    ...



Downloading/unpacking the Oracle9i installation files update JRE_LOCATION for Installer
[ Return to Table of Contents ]

  • Login as the newly created "oracle" user account. (su - oracle). Most of the actions throughout the rest of this document should be done as the "oracle" user account unless otherwise noted.
  • Download Oracle9i from Oracle's OTN site. (If you do not currently have an account with Oracle OTN, you will need to create one. This is a FREE account!)
  • Download the following files to a temporary directory:
    • lnx_920_disk1.cpio.gz (553,607,967 bytes)
    • lnx_920_disk2.cpio.gz (588,817,480 bytes)
    • lnx_920_disk3.cpio.gz (442,135,815 bytes)

  • Directions to extract the files.
    • 1. Run "gunzip " on all the files.

      Eg. gunzip lnx_920_disk1.cpio.gz

      2. Extract the cpio archives with the command: "cpio -idmv < "

      Eg. cpio -idmv < lnx_920_disk1.cpio

      Important Note: Some browsers will uncompress the files but leave the extension the same (gz) when downloading. If the above steps do not work for you, try skipping step 1 and go directly to step 2 without changing the filename.

      Eg. "cpio -idmv < lnx_920_disk1.cpio.gz"

  • You should now have three directories called "Disk1, Disk2 and Disk3" containing the Oracle9i Installation files:

    /Disk1
    /Disk2
    /Disk3



Update Red Hat Linux System - (Oracle MetaLink Note: 252217.1)
[ Return to Table of Contents ]

    The following RPMs, all of which are available on the Red Hat Fedora Core 1 CDs, will need to be updated as per the steps described in Metalink Note: 252217.1 - "Requirements for installing Oracle 9iR2 on RHEL3."

    All of these packages will need to be installed as the root user:

    From Fedore Core 1/Disk #1

      # cd /mnt/cdrom/Fedora/RPMS
      # rpm -Uvh libpng10-1.0.13-9.i386.rpm

    From Fedore Core 1/Disk #2

      # cd /mnt/cdrom/Fedora/RPMS # rpm -Uvh gnome-libs-1.4.1.2.90-35.i386.rpm

    From Fedore Core 1/Disk #3

      # cd /mnt/cdrom/Fedora/RPMS
      # rpm -Uvh compat-libstdc++-7.3-2.96.118.i386.rpm
      # rpm -Uvh compat-libstdc++-devel-7.3-2.96.118.i386.rpm
      # rpm -Uvh compat-db-4.0.14-2.i386.rpm
      # rpm -Uvh compat-gcc-7.3-2.96.118.i386.rpm
      # rpm -Uvh compat-gcc-c++-7.3-2.96.118.i386.rpm
      # rpm -Uvh sysstat-4.0.7-5.i386.rpm
      # rpm -Uvh openmotif21-2.1.30-8.i386.rpm
      # rpm -Uvh pdksh-5.2.14-23.i386.rpm

    Set gcc296 and g++296 in PATH

      Put gcc296 and g++296 first in $PATH variable by creating the following symbolic links:

      # mv /usr/bin/gcc /usr/bin/gcc323
      # mv /usr/bin/g++ /usr/bin/g++323
      # ln -s /usr/bin/gcc296 /usr/bin/gcc
      # ln -s /usr/bin/g++296 /usr/bin/g++

    Check hostname

      Make sure the hostname command returns a fully qualified host name by amending the /etc/hosts file if necessary:

      # hostname

    Install the 3006854 patch:

      The Oracle/Linux Patch 3006854 can be downloaded in the configuration files/scripts section of this document.

      # unzip p3006854_9204_LINUX.zip
      # cd 3006854
      # sh rhel3_pre_install.sh



Install the Oracle 9.2.0.1.0 RDBMS Software
[ Return to Table of Contents ]

    As the "oracle" user account:

  • Set your DISPLAY variable to a valid X Windows display.

    % DISPLAY= :0.0
    % export DISPLAY

    NOTE: If you forgot to set the DISPLAY environment variable and you get the following error:

    Xlib: connection to ":0.0" refused by server
    Xlib: Client is not authorized to connect to Server

    you will then need to execute the following command to get "runInstaller" working again:
    % rm -rf /tmp/OraInstall

    If you don't do this, the Installer will hang without giving any error messages. Also make sure that "runInstaller" has stopped running in the background. If not, kill it.

  • Change directory to the Oracle installation files you downloaded and extracted. Then run: runInstaller.

    % cd /Disk1
    % ./runInstaller

  • During the installation, DO NOT choose to "Create A Database." This how I answered the questions:

    • Inventory Location: /u01/app/oracle/oraInventory
    • UNIX Group Name: dba You will be prompted to run /tmp/orainstRoot.sh as the "root" user account. After performing this action, continue the install by hitting the "Continue" button in the installer.
    • Destination:
      • Name: OraHome920
      • Path: /u01/app/oracle/product/9.2.0
    • Available products: Oracle9i Database 9.2.0.1.0
    • Installation types: Enterprise Edition (2.04 GB)
    • Database configuration: Software only

  • Errors during the "Link" phase:

    About 73% into the Link phase of the install, you will get an error when invoking the target of "install" in makefile: /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk. You should ignore this error and any other errors that follow within the link phase. (There will be another linking error with ins_ctx.mk at around 79%.) Simply ignore all linking errors and continue to the end of the Oracle installation. The problems that occurred during this link phase will be resolved when installing the Oracle 9.2.0.4.0 patchset.

  • Completing the Oracle RDBMS software installation

    After running the root.sh script, you have successfully installed the Oracle9i RDBMS software knowing however that there were problems during the link phase. Also note that several of the Configuration tools at the end of the installation will fail as well. Simply ignore attempting to setup the Oracle networking configuration. Simply hit the "Exit" button to exit from the Oracle Universal Installer.

  • Shutdown any started Oracle processes

    The Oracle Universal Installer will succeed in starting some Oracle programs, in particular the Oracle HTTP Server (Apache). Make sure all programs are shutdown before attempting to continue.

    (i.e. $ORACLE_HOME/Apache/Apache/bin/apachectl stop)



Install the Oracle Universal Installer 2.2.0.18.0
[ Return to Table of Contents ]

    You will need to have downloaded the Oracle RDBMS patchset 9.2.0.4.0 for Linux. This can be downloaded from Metalink. The file is named 9204_lnx32_release.cpio.gz and is approximately 318 MB.

    Extract the patchset file and update the JRE_LOCATION value to point to your Java JDK 1.3.1 installation, just as we did for the original Oracle RDBMS software. The file to update is /Disk1/oraparam.ini Finally, go ahead and install the Oracle Universal Installer 2.2.0.18.0. The installer should work without any errors.



Install the Oracle 9.2.0.4.0 Patchset
[ Return to Table of Contents ]

    Once you have completed the upgrade to the Oracle Universal Installer, you will then need to install the Oracle9iR2 Patchset 3 (9.2.0.4.0). Go ahead and start the installation of the patchset.

    • First errors during the "Link" phase: (ins_oemagent.mk)

      About 79% into the Link phase of the install, you will get an error when invoking the target of "install" invokefile: /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk. For now, simply ignore this message. We will be resolving it in the Post Installation section of this article.

    • Second error during the "Link" phase: (ins_ctx.mk)

      About 84% into the Link phase of the install, you will get another error when invoking the target of "install" in makefile: /u01/app/oracle/product/9.2.0/ctx/lib/ins_ctx.mk. (The same issue exists in 9.0.1 on RedHat Linux.)

      Leave this error message (dialog) up and open a terminal/console window to perform the following.

      Edit the file $ORACLE_HOME/ctx/lib/env_ctx.mk and go to "INSO_LINK =", add a "$(LDLIBFLAG)dl" to the line and save it.

      Here is the full line with the added "$(LDLIBFLAG)dl" flag:

      INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS)

      You will also need to make sure LD_ASSUME_KERNEL=2.4.1 is in your .profile (or .bash_profile if you are using BASH) for the "oracle" user account so that they you can run programs like "dbssist" and "netca".

      After making the above change, return to the popup error dialog box and hit "Retry." It should continue from here with no errors.

    • Continuing with the "Link" phase

      The "Link" phase will now successfully continue to 100% complete. When the "Link" phase is complete, you will be prompted to run the $ORACLE_HOME/root.sh script as the "root" user account. Go ahead and perform this action. When prompted for the "local bin directory," I generally choose to put the files in /opt/bin keeping with my old conventions of Solaris. You may choose to use the default of /usr/local/bin if you would like. Just make sure that whatever directory you choose that it is in the PATH environment variable of the "oracle" user account.

    • Exit Universal Installer

      Exit from the Universal Installer and continue on to the post installation section of the article.



Post installation
[ Return to Table of Contents ]

    Open up a terminal window and login as the Oracle userid then perform the following tasks:

  • Execute these lines:

    % cd $ORACLE_HOME/network/lib
    % make -f ins_net_client.mk install

  • Then edit the $ORACLE_HOME/ctx/lib/ins_ctx.mk file so that lines 13-14 change from:

    ctxhx: $(CTXHXOBJ)
    $(LINK) $(CTXHXOBJ) $(INSO_LINK)

    to:

    ctxhx: $(CTXHXOBJ)
    $(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)

  • Execute this line:

    % make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install

  • Before a database can be created with the DBCA, some of the Oracle tools must be forced to look at an alternative JRE:

    # mv $ORACLE_HOME/JRE $ORACLE_HOME/JRE_ORIG
    # ln -s /usr/java/jdk1.3.1_09/jre $ORACLE_HOME/JRE
    # su - root
    # ln -s /usr/local/java/jre/bin/java /usr/local/java/jre/bin/jre
    # ln -s /usr/local/java/jre/bin/i386/native_threads/java /usr/local/java/jre/bin/i386/native_threads/jre



Configuration files/scripts
[ Return to Table of Contents ]

Example:

.bash_profile

$HOME/.bash_profile for the "oracle" user account.

p3006854_9204_LINUX.zip

Oracle Patch 3006854 for Red Hat Linux 3 Enterprise Edition

initO920DB.ora

Sample instance parameter script for Oracle9i. Place this file in ~oracle/admin/O920DB/pfile before running the RUN_CRDB.sh script below.

create_database920.tar

An example "create database" set of scripts. Untar the file to ~oracle/admin/O920DB/create. If you decide to change the name of the ORACLE_SID, here are the files that need to be changed:

  • crdb.sh
  • create_database.sql
The main script to run is: RUN_CRDB.sh.

This was first published in June 2004

Dig deeper on Oracle database installation, upgrades and patches

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close