Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

Chapter 25. Setting Oracle Environments

Since the Oracle Universal Installer (OUI) "runInstaller" is run from the oracle account, some environment variables must be configured for this account before OUI is started.
Execute the following commands for the Bash which is the default shell on Red Hat Enterprise Linux, to verify your shell run: echo $SHELL):
su - oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl

Note

If ORACLE_BASE is used, then Oracle recommends that you do not set the ORACLE_HOME environment variable but that you choose the default path suggested by the OUI. You can set and use ORACLE_HOME after you finished running OUI.
The environment variables ORACLE_HOME and TNS_ADMIN should not be set. If you set these environment variables, you can unset them by running the following commands:
unset ORACLE_HOME
unset TNS_ADMIN
To have these environment variables set automatically each time you log on as oracle, you can add these environment variables to the ~oracle/.bash_profile file which is the user start up file for the Bash on Red Hat Enterprise Linux. To do this you could simply copy and paste the following commands to make these settings permanent for your oracle accounts Bash shell:
su - oracle
cat >> ~oracle/.bash_profile << EOF
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
EOF