分享

[Oracle]

 goodwangLib 2014-04-07

http://www.oracle.com/technology/tech/oci/instantclient/index.html下载:

oracle-instantclient-basic-10.2.0.4-1.i386.zip

oracle-instantclient-sqlplus-10.2.0.4-1.i386.zip


先创建客户端的安装目录这两个目录可以自定义,但配置环境变量时,需要一致。

mkdir -p /opt/oracle/lib

mkdir -p /opt/oracle/network/admin

(有文章说还需要下载sdk,这里没下载试过也可以。)


解压上面下载的文件。

unzip oracle-instantclient-basic-10.2.0.4-1.i386.zip

unzip oracle-instantclient-sqlplus-10.2.0.4-1.i386.zip

其中,这二个文件都解压到当前目录下的同一个目录下面:

instantclient_10_2

cd instantclient_10_2

把这个目录下的所有文件搬到/opt/oracle/lib


若仅让当前用户能用sqlplus,则仅需要配置文件的修改:

.bash_profile

原:

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

Fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

现:

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

ORACLE_HOME=/opt/oracle

LD_LIBRARY_PATH=/opt/oracle/lib

PATH=.:$PATH:$HOME/bin:$LD_LIBRARY_PATH//若无此处,则打开一个shell后,不能用sqlplus

export PATH

export ORACLE_HOME

export LD_LIBRARY_PATH


有文章介绍需要修改/etc/profile配置环境变量,针对所有用户。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多