本文转载自http://blog.csdn.net/wuxiaoyan_home/article/details/4826440

一、下载oracle 10g sqlplus软件

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

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

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

oracle-instantclient-devel-10.2.0.4-1.i386.rpm

二、安装rpm包

rpm -ivh oracle-instantclient-basic-10.2.0.4-1.i386.rpm

rpm -ivh oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm

rpm -ivh oracle-instantclient-devel-10.2.0.4-1.i386.rpm

三、指定sqlplus运行所需要的库

由于是RPM包安装的,因此,oracle客户端默认所在的路径为/usr/lib/oracle/10.2.0.4/client/lib/

#vi /etc/ld.so.conf

在最后加入:/usr/lib/oracle/10.2.0.4/client/lib

四、重启ldconfig

ldconfig

五、启动sqlplus

sqlplus /nolog

一、配置oracle环境变量

#vi /etc/profile最后加入

export ORACLE_HOME=/usr/lib/oracle/10.2.0.4/client

export LD_LIBRARY_PATH=:$ORACLE_HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH:.

export TNS_ADMIN=$ORACLE_HOME

export PATH=$PATH:$ORACLE_HOME/bin:.

六、配置连接tnsnames.ora

test =
  (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 1521))
  )
  (CONNECT_DATA =
    (SID = test )
    (SERVER=DEDICATED )
  )
)

七、启动

# sqlplus 用户名/密码@test

posted on 2013-11-25 12:01  书中叶  阅读(334)  评论(0编辑  收藏  举报