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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.