4. Set Environment Variables

Log in as the oracle user:

su - oracle

Edit .bash_profile in oracle's home directory and add the following, for instance using vim:


########## Oracle Variables ##########
echo " Welcome to oracle";
ORACLE_BASE=/u01/app/oracle
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.0
ORACLE_SID=ORTD
LD_PRELOAD=$HOME/libcwait.so
export DISPLAY=172.28.66.39:0.0
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib

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

LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
THREADS_FLAG=native; export THREADS_FLAG
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_PRELOAD
########## End of Oracle variables ##########