How to set .bash_profile in Linux for Oracle
This page will walk through How to set .bash_profile
in Linux for Oracle. .bash_profile
is executed to configure your login shell before the initial command prompt.
Login as the oracle user and add the following lines in the .bash_profile
file.
oracle-home-dir/.bash_profile
export PATH=$PATH:$HOME/bin
#Oracle Environment
export ORACLE_HOME=/home/oracle/oracle/product/11.2.0/dbhome_1
export ORACLE_BASE=/home/oracle/oracle
export ORACLE_SID=oracle
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export JAVA_HOME=/opt/java/jdk1.8.0_14/
export PATH=$JAVA_HOME:$PATH:$ORACLE_HOME/bin
alias l='ls -lrt'
Save .bash_profile and execute it to effect at the kernel level.
$ . .bash_profile
PS: Tested with Oracle 11g.