Installation of 9iAS Infrastructure on Redhat 7.3

This document is an overview of the steps required to configure the Oracle 9iAs Infrastructure on Redhat Linux 7.3. It is designed to supplement two documents available from Oracle:

You should be familiar with those documents and have them available. This document supplements them by:


It does not cover:

Questions on this document should be addressed to alceste@xmission.com.

Application Server Installation Types.

Oracle 9iAS has two general classes of installation: the Infrastructure installation, and the “regular” application server installation. If you want to any of the features of 9iAS other than the webserver and OC4J (Oracle Containers for Java) you'll need to have an Infrastructure running. The Infrastructure installation creates a 9iR1 Database instance, used for Oracle Internet Directory (an LDAP database) and other schemas needed by Infrastructure services. You don't get any choices on install as to configure to install this database.

Note: the Oracle 9iAS install is very poor. You get very few choices as to how to configure anything, poor feedback, and it's impossible to install only what you need. My hope is that this document will become quickly deprecated as Oracle improves the installation process.

Verify System Requirements

In order to obtain reasonable performance, the machine being installed with infrastructure should be at least a Pentium-II 400 with 512MB RAM. The device(s) used to install Oracle Application Server onto should have at least 5 gig of free space; one disk should have at least 3.5 gigabytes. In addition, your system should have 1 gigabyte of swap space, and 500 megabytes free in the /tmp filesystem.

The system should be running Redhat 7.3 with all security updates patched. I have tested this installation of two versions of Redhat with mostly complete installs, and it has worked correctly.

Create Installation Shares

You will have to create a place for Oracle on your system. If this is a workstation system with a single disk, then there's little to be gained in making several physical partitions and filesystems to store Oracle on. If this is a full-featured server with many disks, you will want to create at least four partitions and filesystems for Oracle.

Traditionally, on UNIX, these are named /u01, /u02, /u03 and /u04. Consult the Oracle Documentation for the OFA (Optimal Flexible Architecture) for more information.

If you only have a single disk, just use a single filesystem called /oracle, with all “u” directories underneath that.

#mkdir /oracle/u01

#mkdir /oracle/u02

#mkdir /oracle/u03

#mkdir /oracle/u04

Note 1: Oracle officially only supports the ext2 filesystem. However, I believe quicker recovery from a hard outage can be had by using the ext3 filesystem, a journaling version of ext3. Other journaling filesystems (xfs and Reiserfs) exist for Linux, but the are not supported fully in Redhat 7.3. As always, your milege may vary.

Note 2: You might be tempted to symbolically link /oracle/u01 to /u01 and so forth. However, this creates a nasty undocumented problem when you try to configure various security permissions. You should NOT use symbolic links in your Oracle path with 9iASinfrastructure.

Download and Install Installation Directory

Create an install directory. This does not need to be on the Oracle filesystem. It should have at least 4 gig of free space on it, in addition to the space required above. This directory does not have to be on an attached disk (it can be NFS mounted off the network).

You will need four files:

linux_iasv90201_Disk1.cpio.gz

linux_iasv90201_Disk2.cpio.gz

linux_iasv90201_Disk3.cpio.gz

linux_iasv90201_Disk4.cpio.gz

These files can be downloaded from Oracle. You will need to agree to a developer license, which allows you to use this product for development only.

Use gzip and the cpio program to extract the files.

#cd [directory_name}

#guzip linux*

#cpio -idmv <linux_iasv90201_Disk1.cpio

#cpio -idmv <linux_iasv90201_Disk2.cpio

#cpio -idmv <linux_iasv90201_Disk3.cpio

#cpio -idmv <linux_iasv90201_Disk4.cpio

This should create four directories in your installation directory: Disk1, Disk2, Disk3, and Disk4.

Alter Kernel Parameters

Redhat should give you mostly adequate kernel parameters to run Oracle9iAS. There are a few that need to be altered. This script sets the parameters to the either the Oracle Recommendations or the Redhat defaults on a 512M system.

Note: these are the same kernel parameters as Oracle9iR1 and 9iR2's database require. If you've already created a script to correctly configure those parameters, you should be OK reusing that script.

Copy this script into the /etc/rc.d/init.d/ directory.

/etc/rc3.d/init.d/oraclekernel

#!/bin/sh
#
# chkconfig: 2345 26 74
# description: sets and unsets oracle kernel parameters
# processname: none
# config: /etc/sysconfig/oraclekernel

#shared memory
SEMMNI=100
SEMMNS=32000
SEMOPM=128
SEMMSL=100
SHMMAX=2147483648
SHMMIN=1
SHMMNI=4096
SHMSEG=4096
SHMVMX=32767
SHMALL=2097152
SOCKET_LOWER=1024
SOCKET_HIGHER=65000
if [ -f /etc/sysconfig/oraclekernel ]
then
. /etc/sysconfig/oraclekernel
fi

start() {
echo -n $"Setting Oracle Kernel Parameters"
echo
echo ${SEMMSL} ${SEMMNS} ${SEMOPM} ${SEMMNI} > /proc/sys/kernel/sem
echo ${SHMMAX} > /proc/sys/kernel/shmmax
echo ${SHMMNI} > /proc/sys/kernel/shmmni
echo ${SHMALL} > /proc/sys/kernel/shmall
echo ${FILE_MAX} > /proc/sys/fs/file-max
ulimit -n ${FILE_MAX}
echo ${SOCKET_LOWER} ${SOCKET_HIGHER} > /proc/sys/net/ipv4/ip_local_port_range
ulimit -u ${PROCS_USER}
RETVAL=$?
}

stop() {
echo
}

dostatus() {
RETVAL=0
}

restart() {
stop
start
RETVAL=$?
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
dostatus
;;
restart|reload)
restart
;;
*)
echo "Usage: oraclekernel {start|stop|status|restart|reload}"
exit 1
esac

exit $RETVAL

Create a symbolic link to the above script in /etc/rc.d/rc3.d/

# ln -s /etc/init.d/oraclekernel /etc/rc.d/rc3.d/S10oraclekernel

This will set the Oracle parameters for you on every boot.  Once you have done this, you should run the script to alter your configuration before you begin the install.

# /etc/init.d/oraclekernel start

If you don't do this, you'll run into problems when you're creating your database.


Create group and user accounts

Now you must create the UNIX groups required by oracle. I create these groups in the system space using Redhat's extensions to the useradd and groupadd commands.

#/usr/sbin/groupadd -r dba

#/usr/sbin/groupadd -r oinstall

#/usr/sbin/useradd -g oinstall -G dba -d /home/oracle -r -m oracle

Change ownership of the needed /u01 directories.

#chown -R oracle:dba /oracle/u01

#chown -R oracle:dba /oracle/u02

#chown -R oracle:dba /oracle/u03

#chown -R oracle:dba /oracle/u04

In order for the Oracle Web Services to run as a webserver user, and not as an Oracle user, you must change the primary group of apache for the Oracle install.  You can skip this step if you didn't install the Apache webserver when you loaded Linux.

# /usr/sbin/usermod -g oinstall apache

Install Java Virtual Machine

Download the JDK 1.3.1 runtime in RPM form from java.sun.com. Follow the installation directions. It should install in /usr/java/jre1.3.1_04/. If it installs in a different location, be sure to correctly set the value of “JAVA_HOME” in the next section to the new location.

Configure Necessary Environment for Oracle User

The Oracle user should have several environment variables created prior to beginning the installation of 9iAS Infrastructure. The most effective way to do this is to configure the oracle user's shell by editing ~/.bashrc The bashrc file runs when you login as the Oracle user, or su using the – argument. 1 Edit the ~oracle/.bashrc to include the necessary environment variables. Here is a .bashrc listing for a typical setup:


~oracle/.bashrc

export PATH=/sbin:/usr/sbin:${PATH}
export ORACLE_BASE=/oracle/u01/app/oracle
export JAVA_HOME=/usr/java/jre1.3.1_04
export CLASSPATH=${JAVA_HOME}/lib
export LD_LIBRARY_PATH=${JAVA_HOME}/lib:${JAVA_HOME}/lib/i386/classic:${JAVA_HOME}/lib/i386/native_threads:${LD_LIBRARY_PATH}
export TMP=/tmp
export TMPDIR=/tmp
export TEMP=/tmp

These settings will increase the process and file parameters for Oracle. 

/etc/profile.d/oracle.sh

# Change ulimit process and file parameters for oracle.
ulimit -S -c 0 > /dev/null 2>&1
ulimit -n 65536 > /dev/null 2>&1
ulimit -u 16384 > /dev/null 2>&1


Disable Firewalling

If you installed Redhat 7.3 with firewalling support, it's using a feature called ipchains to block particular ports from access. Assuming that you're behind a firewall, turn off ipchains support by issuing /etc/init.d/ipchains stop. It should flush the rule buffers and allow connections from outside machines to the ports Infrastructure configures. When your environment is set up, it will be a good idea to revisit re-enabling the firewall features.

Install ksh if it's not installed

For the install to complete, you must have the ksh shell installed. Download the current “pdksh-*” rpm for your system and install it.

Verify Host Table

Your machines hosttable should contain both an entry for localhost and a separate entry for each ip address assigned to your machine. Verify that this is the case.

For example:

127.0.0.1 localhost.localdomain localhost

10.10.1.40 oracleas1.yourself.org oraas1


Move or Remove Linux LDAP commands

Oracle internet directory installs its own version of commands to create and modify ldap entries. You have two choices: uninstall the ldap RPMs, or simply rename those files. The latter choice is easiest:

mv /usr/bin/ldapadd /usr/bin/ldapadd.bak

mv /usr/bin/ldapdelete /usr/bin/ldapdelete.bak

mv /usr/bin/ldapmodify /usr/bin/ldapmodify.bak

mv /usr/bin/ldapmodrdn /usr/bin/ldapmodrdn.bak

mv /usr/bin/ldappasswd /usr/bin/ldappasswd.bak

mv /usr/bin/ldapsearch /usr/bin/ldapsearch.bak

(Or, a shortcut to this is

for file in `ls ldap*`; do mv ${file} ${file}.bak; done"

)

Delete LDAP from /etc/services.

Remove the entries from the /etc/services file for ldap and ldaps. They should be at both ports 389 and 636. Otherwise, Oracle will consider those ports reserved and attempt to install ldap services at a different port.

Start the Installation

One you have done that, assuming you're installing on the local machine, you'll need to allow other users (the oracle user) to display on your machine's screen. You do this by using the xhost command.

#xhost +localhost

This will allow any user on the local machine to display windows on your desktop. You'll need this to display the GUI oracle installer when installing as oracle. Finally, you can

#su - oracle

Start the installation by running:

$[your-oracle-installation-directory]/Disk1/runInstaller


Fix a Little Bug

Soon after the installation starts, you should be able to work around an issue with the linker that prevents oracle's client libraries from building correctly. Soon after the installation starts copying files, do the following.

  1. Open a new shell with the oracle user

  2. Set the $ORACLE_HOME to the $ORACLE_HOME you specified during the installation if not already set

  3. Edit genclntsh (vi genclntsh) and REMOVE the ${LD_SELF_CONTAINED} flag from the ld command in the 'Create Library' section.

If you don't do this in time, you'll get the message:

Error invoking target install of makefile /i01/app/oracle/product/9iASinfrastructure/sqlplus/lib/ins_sqlplus.mk

If you get this message, complete the three steps mentioned above, then run the genclntsh script from $ORACLE_HOME/bin. When it completes, hit retry in the Universal Installer.


Finish the Installation

If all these steps have completed successfully, you should have installed 9iAS infrastructure.