Heim >Datenbank >MySQL-Tutorial >oracle 11g在CentOS 5.5上安装以后,sqlplus不能使用
假如我的安装路径如下:/home/lxm/app/lxm/product/11.2.0/dbhome_1/bin 那么在/home/lxm/.bash_profile 文件中添加如下内容: export ORACLE_BASE=/home/lxm/app/lxm export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=orcl expo
假如我的安装路径如下:/home/lxm/app/lxm/product/11.2.0/dbhome_1/bin
那么在 /home/lxm/.bash_profile
文件中添加如下内容:
export ORACLE_BASE=/home/lxm/app/lxm
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
然后执行:soruce /home/lxm/.bash_profile
使其生效即可
输入sqlplus /nolog
出现如下提示:
[lxm@wn7-lcg /]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 15 14:10:56 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL>
就成功了