Welcome to Oracle Database Administrator Home

24x7 oracle database support and solutions
Oracle DBA Home     Routine Maintenance     PostgreSQL     Unix Commands     CVS     Oracle FAQ     Oracle Concepts     SQLPlus     OEM     ASM     Data Guard     RAC     RMAN     Networking     OAS     Partitioning      

 

[root]

 

You will need the following components for a successful install.

 

1) Oracle9i database downloads (Oracle9i Database Release 2 Enterprise/Standard Edition for Intel Linux). These files can be downloaded from http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.html.
- lnx_920_disk1.cpio.gz (553,239,173 bytes)
- lnx_920_disk2.cpio.gz (588,798,999 bytes)
- lnx_920_disk3.cpio.gz (442,087,410 bytes)

 

2) RedHat RPM packages. These rpms can be obtained from RedHat Enterprise Linux ES Release 3.0 CDs.

 

CD #2

 

setarch-1.3-1.i386.rpm

 

tcl-8.3.5-92.i386.rpm

 

CD #3

 

openmotif21-2.1.30-8.i386.rpm

 

compat-db-4.0.14-5.i386.rpm

 

compat-gcc-7.3-2.96.122.i386.rpm

 

compat-gcc-c -7.3-2.96.122.i386.rpm

 

compat-libstdc -7.3-2.96.122.i386.rpm

 

compat-libstdc -devel-7.3-2.96.122.i386.rpm

 

3) libctypefixup-1.0.tar.gz
This file creates a tiny library that implements __libc_wait as a global function. This fixes the ins_oemagent.mk make error when the linking reaches 71%. This file can be downloaded from
http://www.firstworks.com/support/libctypefixup-1.0.tar.gz

 

4) ins_ctx.mk and bug2037255.o
This fixes the ins_ctx.mk make error when the linking reaches 86%. These two files can be downloaded from
http://www.the-love-shack.net/oracle-on-sid.html.

 

5) Oracle 9.2.0.4 patches. You need these patches to upgrade from Oracle 9.2.0.1 to Oracle 9.2.0.4. (If you are a registered user with valid CSI, you can download these files from http://metalink.oracle.com). 
- p3006854_9204_LINUX.zip (1,440 bytes)
- p2617419_210_GENERIC.zip (196,904 bytes)
- p3119415_9204_LINUX.zip (6,432 bytes)
- p30952577_9204_LINUX.zip (334,064,449 bytes)

 

6) Disk space

 

/tmp (2 Gb)
The Oracle Universal Installer requires up to 400Mb of space in the /tmp directory. If you do not have enough space in the /tmp directory, set the TMPDIR and TMP environment variables to specify a directory with sufficient space.

 

/opt (3.5 Gb of free space)
I choose to install the Oracle instance and the initial test database in the /opt/oracle folder.

 

/garb (4 Gb of free space)
This is my temporary folder to hold the downloaded Oracle database downloads and the unzipped Oracle install files. (I used this folder to store all my downloads).

 

Swap space (2 Gb)

 

7) Oracle recommends at least 512Mb memory and swap space equal to the system’s physical memory, or 1Gb, whichever is greater. (My machine has 640Mb memory 2Gb swap space. The install was successful). However, if your machine doesn’t meet the recommendations, you can set up a temporary Linux swap area. Execute these commands as root:

$ dd if=/dev/zero of=tmp_swap bs=1k count=900000
$ chmod 600 tmp_swap
$ mkswap tmp_swap
$ swapon tmp_swap

 

After you finish installing, you can free this space:

$ swapoff tmp_swap
$ rm tmp_swap

 

 

8) Java Runtime Environment (JRE). Download j2re-1_3_1_09-linux-i586.bin from http://java.sun.com/products/archive/index.html.

 

Unzip Oracle Downloads

 

[root]

 

Once the Oracle zipped files have been downloaded, issue these commands to unzip the files.

 

$ zcat lnx_920_disk1.cpio.gz | cpio -idmv

 

$ zcat lnx_920_disk2.cpio.gz | cpio -idmv

 

$ zcat lnx_920_disk3.cpio.gz | cpio -idmv

 

After the zcat commands, the Disk1, Disk2, and Disk3 folders will be created

total 1548552
drwxr-xr-x 5 root root 4096 Jan 4 01:55 .
drwxr-xr-x 4 root root 4096 Jan 4 01:42 ..
drwxr-xr-x 7 2840 562 4096 Jun 19 2002 Disk1
drwxrwxr-x 3 2840 562 4096 May 14 2002 Disk2
drwxrwxr-x 3 2840 562 4096 May 14 2002 Disk3
-rwxr-xr-x 1 root root 553239173 Jan 4 01:45 lnx_920_disk1.cpio.gz
-rwxr-xr-x 1 root root 588798999 Jan 4 01:43 lnx_920_disk2.cpio.gz
-rwxr-xr-x 1 root root 442087410 Jan 4 01:44 lnx_920_disk3.cpio.gz

 

Respective folder size:

Disk1 ~ 653M
Disk2 ~ 581M
Disk3 ~ 442M

 

Create Groups And Users

 

[root]

 

You will need to create the Oracle installation users and groups. Oracle installation needs two Unix user groups and one runtime Oracle user.

 

Log in as root and create a new group called dba, this administrative group is required by Oracle to complete installation and to control database operations that are executed when a database is not mounted. Users that belong to the dba group are granted SYSDBA privileges, which comprise all database system privileges.

 

$ groupadd dba

 

Create a new group called oinstall. This group owns the Oracle Universal Installer’s oraInventory directory.

 

$ groupadd oinstall

 

Create a user called oracle, put it in group dba and oinstall.

 

$ useradd -g oinstall -G dba oracle

 

Change the password for oracle user. This command will prompt you to enter the password for your oracle user.

 

passwd oracle

 

Example:

 

# groupadd dba

 

# groupadd oinstall

 

# useradd -g oinstall -G dba oracle

 

# passwd oracle

 

Changing password for user oracle.

 

New password:

 

Retype new password:

 

passwd: all authentication tokens updated successfully.

 

Create Oracle Base And Data File Directories

 

[root]

 

Oracle Corporation recommends that the Optimal Flexible Architecture (OFA) standard be implemented when installing and configuring Oracle9i databases. The OFA standard is a set of configuration guidelines for creating fast, highly available, and reliable Oracle databases that require little maintenance. An OFA-compliant database:

 

- Organizes file systems to allow for easy administration

 

- Accommodates scalability, such as adding data into existing databases, or adding users to the system

 

- Distributes I/O loads across disk drives to prevent performance bottlenecks caused by multiple read/write commands issued simultaneously to a single drive

 

- Distributes applications across more than one drive to safeguard against disk failure

 

- Ensures integrity of login home directories when home directories are added, moved, or deleted by the DBA

 

- Allows multiple versions of the application software to be used concurrently

 

For simplicity, I installed everything under /opt/oracle. At least 3.5 GB available for a full installation including one database. These are the commands:

 

Create the folder to store the Oracle runtime directories

 

$ mkdir -p /opt/oracle/product/9.2

 

Grant write privileges to user oracle and execute privileges to group dba.

 

$ chown -R oracle.dba /opt/oracle/*

 

Install RedHat RPM Packages

 

[root]

 

If you choose the Development Tools package when installing RedHat Enterprise Linux ES Release 3.0, the following RPMs are installed by default.

setarch-1.3-1.i386.rpm
tcl-8.3.5-92.i386.rpm

 

You need to install these RPMs from RedHat Enterprise Linux ES Release 3.0 CD#3.

openmotif21-2.1.30-8.i386.rpm
compat-db-4.0.14-5.i386.rpm
compat-gcc-7.3-2.96.122.i386.rpm
compat-gcc-c -7.3-2.96.122.i386.rpm
compat-libstdc -7.3-2.96.122.i386.rpm
compat-libstdc -devel-7.3-2.96.122.i386.rpm

 

Obtain the RedHat RPM packages from CD #3, install them using the following commands:

 

$ rpm -Uvh compat-gcc-7.3-2.96.122.i386.rpm

 

$ rpm -Uvh compat-libstdc -7.3-2.96.122.i386.rpm

 

$ rpm -Uvh compat-libstdc -devel-7.3-2.96.122.i386.rpm

 

$ rpm -Uvh compat-gcc-c -7.3-2.96.122.i386.rpm

 

$ rpm -Uvh compat-db-4.0.14-5.i386.rpm

 

Running the rpm query command to check the install:

 

# rpm -q openmotif21-2.1.30-8 compat-db-4.0.14-5 compat-gcc-7.3-2.96.122 compat-gcc-c -7.3-2.96.122 compat-libstdc -7.3-2.96.122 compat-libstdc -devel-7.3-2.96.122

 

openmotif21-2.1.30-8

 

compat-db-4.0.14-5

 

compat-gcc-7.3-2.96.122

 

compat-gcc-c -7.3-2.96.122

 

compat-libstdc -7.3-2.96.122

 

compat-libstdc -devel-7.3-2.96.122

 

Install libctypefixup-1.0.tar.gz

 

[root]

 

Unzip, make and install the libctypefixup-1.0.tar.gz

 

$ tar zxvf libctypefixup-1.0.tar.gz

 

libctypefixup-1.0/

 

libctypefixup-1.0/COPYING

 

libctypefixup-1.0/Makefile

 

libctypefixup-1.0/README

 

libctypefixup-1.0/test.C

 

libctypefixup-1.0/test.c

 

libctypefixup-1.0/ctypefixup.c

 

 

$ cd libctypefixup-1.0

 

$ ls -al

 

total 52

 

drwxrwxr-x 2 root root 4096 Nov 6 11:39 .

 

drwxrwxrwx 9 root root 4096 Jan 31 00:22 ..

 

-rw-rw-r-- 1 root root 23889 Nov 5 10:48 COPYING

 

-rw-rw-r-- 1 root root 311 Nov 5 12:43 ctypefixup.c

 

-rw-rw-r-- 1 root root 405 Nov 6 11:36 Makefile

 

-rw-rw-r-- 1 root root 1678 Nov 6 11:28 README

 

-rw-rw-r-- 1 root root 216 Nov 6 11:35 test.c

 

-rw-rw-r-- 1 root root 233 Nov 6 11:39 test.C

 

 

$ make

 

cc -c -o ctypefixup.o ctypefixup.c

 

ar cq libctypefixup.a ctypefixup.o

 

ld -shared -o libctypefixup.so ctypefixup.o

 

 

$ make install

 

cp libctypefixup.a /lib

 

cp libctypefixup.so /lib

 

Install j2re-1_3_1_09 

 

[root]

 

Download the j2re-1_3_1_09-linux-i586.bin from http://java.sun.com/products/archive/index.html and copy the file to /usr/java directory. Run the j2re-1_3_1_09-linux-i586.bin and install the jre into /usr/java/jre1.3.1_09 directory.

 

$ pwd

 

/usr/java

 

$ ls -al

 

total 15084

 

drwxr-xr-x 2 root root 4096 Jan 31 00:44 .

 

drwxr-xr-x 17 root root 4096 Jan 31 00:44 ..

 

-rwxr-xr-x 1 root root 15415666 Jan 31 00:44 j2re-1_3_1_09-linux-i586.bin

 

$ ./j2re-1_3_1_09-linux-i586.bin

 

Sun Microsystems, Inc. Binary Code License Agreement

 

READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS....

 

.......

 

.......

 

7. Termination for Infringement. Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right.

 

For inquiries please contact: Sun Microsystems, Inc.,
4150 Network Circle, Santa Clara, California 95054, U.S.A.
(LFI#130037/Form ID#011801)

 

Do you agree to the above license terms? [yes or no] yes

 

Unpacking...

 

Checksumming...

 

0

 

0

 

Extracting...

 

UnZipSFX 5.40 of 28 November 1998, by Info-ZIP (Zip-Bugs@lists.wku.edu).

 

creating: jre1.3.1_09/

 

creating: jre1.3.1_09/bin/

 

creating: jre1.3.1_09/bin/i386/

 

creating: jre1.3.1_09/bin/i386/green_threads/

 

inflating: jre1.3.1_09/bin/i386/green_threads/java

 

inflating: jre1.3.1_09/bin/i386/green_threads/oldjava

 

inflating: jre1.3.1_09/bin/i386/green_threads/javac

 

inflating: jre1.3.1_09/bin/i386/green_threads/oldjavac

 

.......

 

.......

 

.......

 

inflating:

 

jre1.3.1_09/man/ja_JP.eucJP/man1/keytool.1

 

inflating: jre1.3.1_09/man/ja_JP.eucJP/man1/rmid.1

 

inflating: jre1.3.1_09/man/ja_JP.eucJP/man1/rmiregistry.1

 

inflating: jre1.3.1_09/man/ja_JP.eucJP/man1/tnameserv.1

 

creating: jre1.3.1_09/plugin/

 

creating: jre1.3.1_09/plugin/i386/

 

creating: jre1.3.1_09/plugin/i386/ns600/

 

inflating: jre1.3.1_09/plugin/i386/ns600/libjavaplugin_oji.so

 

creating: jre1.3.1_09/plugin/i386/ns4/

 

inflating: jre1.3.1_09/plugin/i386/ns4/javaplugin.so

 

inflating: jre1.3.1_09/ControlPanel.html

 

Done.

 

Setup Kernel Parameters

 

[root]

 

Append these lines to the bottom of /etc/sysctl.conf file to set kernel parameters:

 

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

 

Append these lines to the bottom of /etc/security/limits.conf file to modify your resource limits:

 

oracle soft nofile 65536

 

oracle hard nofile 65536

 

oracle soft nproc 16384

 

oracle hard nproc 16384

 

Setup ORACLE Environment Variables

 

[oracle]

 

Login as oracle user and add these entries to /home/oracle/.bashrc: file.

 

VariablesExplanation Value 
ORACLE_BASEDirectory at the top of the Oracle software and administrative file structure. /opt/oracle
ORACLE_HOMEName of the Oracle home directory. /opt/oracle/product/9.2
ORACLE_SIDThe Oracle server instance identifier to use during installation. test
NLS_LANGNational Language Support(NLS) for character sets and bidirectional support for text reading order. AMERICAN_AMERICA.US7ASCII

 

Red Hat Enterprise Linux ES includes now the Native POSIX Thread Library (NPTL) which is an improved implementation of POSIX threads for Linux. But using NPTL will cause several problems for Oracle applications. To fix this problem, you can set the environment variable LD_ASSUME_KERNEL to 2.4.1, which means that the old "Linuxthreads with floating stacks" implementation will be used. Otherwise the Oracle installer runInstaller will hang, the Database Configuration Assistant dbca won't start.

 

Example of a /home/oracle/.bashrc file:

 

$ cat .bashrc

 

# .bashrc

 

# User specific aliases and functions

 

# Source global definitions

 

if [ -f /etc/bashrc ]; then

 

  . /etc/bashrc

 

fi

 

#

 

# oracle 9i

 

export ORACLE_BASE=/opt/oracle

 

export ORACLE_HOME=$ORACLE_BASE/product/9.2

 

export ORACLE_OWNER=oracle

 

export ORACLE_SID=test

 

export ORACLE_TERM=xterm

 

#

 

# Use old Linuxthreads with floating stacks instead of the new

 

# Native POSIX Thread Library (NPTL)

 

export LD_ASSUME_KERNEL=2.4.1

 

export THREADS_FLAG=native

 

#

 

# Setup LD_LIBRARY_PATH, PATH, CLASSPATH, ORACLE_OEM_JAVARUNTIME

 

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

 

export PATH=$ORACLE_HOME/bin:/usr/java/jre1.3.1_09/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH

 

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$CLASSPATH

 

export ORACLE_OEM_JAVARUNTIME=/usr/java/jre1.3.1_09:$ORACLE_OEM_JAVARUNTIME

 

#

 

# change this NLS settings to suit your language requirement:

 

#

 

export NLS_LANG='AMERICAN_AMERICA.US7ASCII'

 

#

 

Edit Disk1/install/linux/oraparam.ini

 

[root]

 

Edit Disk1/install/linux/oraparam.ini and change the JRE_LOCATION to the directory where java is installed, /usr/java/jre1.3.1_09.

 

From:

 

$ cat oraparam.ini

 

[Oracle]

 

DISTRIBUTION=TRUE

 

SOURCE=../../stage/products.jar

 

LICENSE_LOCATION=

 

JRE_LOCATION=../../stage/Components/oracle.swd.jre/1.3.1.0.0/1/DataFiles/Expanded/jre/linux

 

OUI_LOCATION=../../stage/Components/oracle.swd.oui/2.2.0.12.0/1/DataFiles/Expanded

 

JRE_MEMORY_OPTIONS=" -mx200m"

 

DEFAULT_HOME_LOCATION=

 

DEFAULT_HOME_NAME=OUIHome

 

NO_BROWSE=/net

 

NLS_ENABLED=TRUE

 

BOOTSTRAP=TRUE

 

OUI_VERSION=2.2.0.12.0

 

To

 

$ cat oraparam.ini

 

[Oracle]

 

DISTRIBUTION=TRUE

 

SOURCE=../../stage/products.jar

 

LICENSE_LOCATION=

 

JRE_LOCATION=/usr/java/jre1.3.1_09

 

OUI_LOCATION=../../stage/Components/oracle.swd.oui/2.2.0.12.0/1/DataFiles/Expanded

 

JRE_MEMORY_OPTIONS=" -mx200m"

 

DEFAULT_HOME_LOCATION=

 

DEFAULT_HOME_NAME=OUIHome

 

NO_BROWSE=/net

 

NLS_ENABLED=TRUE

 

BOOTSTRAP=TRUE

 

OUI_VERSION=2.2.0.12.0

 

Create Symbolic Links For gcc296 And g 296

 

[root]

 

Put gcc296 and g 296 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

 

Reboot The Machine

 

[root]

 

The machine can now be rebooted to make kernel and other settings effective.

 

$ shutdown –r now