在root模式下修改.bash_profile或者oracle下修改.bashrc
#cd ~
#vi .bashrc
增加以下环境配置内容:
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=/opt/oracle/app/oracle/product/11.2.0/dbhome_1
export PATH=/opt/oracle/app/oracle/product/11.2.0/dbhome_1/bin:$PATH
export ORACLE_SID=orcl
export PS1='[\u@\h \W]\$'
export ORACLE_PID=orcl
:wq
$source .bashrc
$reboot