Initial Oracle Setup
Follow these instructions to get Oracle up and running on your new Linux box.
1. Setup the oracle account, and environment as follows.
Create an oracle user on your linux box:
$ adduser oracle
2. Login to the oracle account and edit .oraenv9i as follows (assumes bash):
# oracle environment variables
export ORACLE_BASE=”/home/oracle”
export ORACLE_HOME=”/home/oracle/product/9.2.0″
# EAST on machines #2
export ORACLE_SID=”WEST”
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=”$ORACLE_HOME/lib”
export LD_ASSUME_KERNEL=2.2.5
# US7ASCII is the default, but WE8ISO8859P1 support more languages
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_TERM=xterm
export ORACLE_OWNER=oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
# run the RH compatability stuff
. /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
# setup Java
export JAVA_HOME=/usr/local/java
export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.zip:$ORACLE_HOME/JRE:$ORACLE_HOM
E/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib:.
Add this line to your .bash_profile:
. /home/oracle/.oraenv9i
Next install the glibc backward compatability libs per
egcs-6.2-1.1.2.14.i386.rpm
glibc-6.2-2.1.3.2.i386.rpm
2-3.i386.rpm
3. Next install JDK.
4. Edit the hosts file if necessary to include two machines on your local network
by name. I used “utopia” and “zenith”.
5. Next run the Oracle installer as follows (assuming you opened the packages in
/tmp). If you’re not on the X-window console, connect with SSH and you should ha
ve x tunneling by default, and can display remotely:
$ ./tmp/Disk1/install/linux/runInstaller
First install the cluster manager. You’ll be prompted for the local and remote h
ostname, a quorum disk, as well as some other things. Doesn’t matter what you en
ter right now, as we’re going to go back and edit those files and do things by ha
nd anyway.
6. Next go through the 9.2.0.1 software install. Here are some other notes with
various weblinks. Be sure to select “Enterprise Edition” and also “Software Only
Install”.
I got started with this Oracle 8 install doc which details which compatability li
braries you’ll need, how to setup the Oracle account, environment variables, and
Java.
I ran into some trouble with LD_ASSUME_KERNEL, and compat libs:
You’ll encounter problems with the context makefile, and get this error “Error in
invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ ins_ctx.m
k”. Sad but true, this is *NORMAL* behavior. I suspect making the installer run
flawlessly isn’t at the top of Oracle’s priority list.
I also encountered problems with Oracle Net Configuration Assistant “Can’t find $
ORACLE_HOME/jre/1.1.8/bin/../bin/i586/green_threads/jre” and I added this symlink
:
$ ln -s $ORACLE_HOME/jre/1.1.8/bin/i686
$ORACLE_HOME/jre/1.1.8/bin/i586
I got a simlar error for libjava.so:
$ ln -s $ORACLE_HOME/jre/1.1.8/lib/i686
$ORACLE_HOME/jre/1.1.8/lib/i586
Though you’ll probably want to create your own database from scratch later, it’s
sometimes instructive to let the Oracle Database Configuration Assistant create a
starter one for you, and look at what options they use. As with the rest, you’l
l run into an error. This time it is “ORA-27123 unable to attach to shared memor
y segment: Oracle Database Configuration Assistant”. Fix it by doing the followi
ng as root on your linux box:
$ cat /proc/sys/kernel/shmmax
33554432
$ echo `expr 1024 * 1024 * 1024` > /proc/sys/kernel/shmmax
$ cat /proc/sys/kernel/shmmax
1073741824
Obviously you’ll have to go through this process (living hell?) on both boxes you
‘ll be using in your cluster.
Next rerun the installer and specify the location of the itty bitty 235M patch, a
nd install that.
7. Enable RAC in Oracle9i
The Real Application Cluster feature is *NOT* enabled by default. Here’s how you
enable it:
As the oracle user:
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
$ make -f ins_rdbms.mk ioracle
As root set permissions on rac_on
$ chown oracle /etc/rac_on
$ chgrp dba /etc/rac_on
Part 2 – Basic Costs + Hardware Platform Outline
Part 3 – Software Requirements, Versions, etc
Part 5 – Firewire + OCFS Setup
Part 6 – Cluster Manager Setup
Part 7 – Cluster Database Setup
Part 8 – Review of Clustered Features + Architecture