一、下载必要的资源包 从oracle官方网站上下载安装包,选择version 10.1.0.5即可。 http://www.oracle.com/technetwork/topics/
一、下载必要的资源包
从oracle官方网站上下载安装包,选择version 10.1.0.5即可。
version 10.1.0.5 instant client package - basic: all files required to run oci, occi, and jdbc-oci applications
instantclient-basic-linux32-10.1.0.5-20060511.zip (31,413,713 bytes) (cksum - 384697539)
*instant client package - jdbc supplement: additional support for xa, internationalization, and rowset operations under jdbc
instantclient-jdbc-linux32-10.1.0.5-20060511.zip (4,649,614 bytes) (cksum - 753190421)
*instant client package - sql*plus: additional libraries and executable for running sql*plus with instant client
instantclient-sqlplus-linux32-10.1.0.5-20060511.zip (331,854 bytes) (cksum - 722849044)
*instant client package - sdk: additional header files and an example makefile for developing oracle applications with instant client
instantclient-sdk-linux32-10.1.0.5-20060511.zip (294,618 bytes) (cksum - 4282446920)
optional packages are marked with a *.
installation steps:
1. download the appropriate instant client packages for your platform. all installations require the basic package.
2. unzip the packages into a single directory such as instantclient.
3. set the library loading path in your environment to the directory in step 2 (instantclient). on many unix platforms, ld_library_path is the appropriate environment variable. on windows, path should be used.
4. start your application and enjoy.
二、目录安排
把上述几个文件解压到/home/ instantclient10_1目录中
/home/ instantclient10_1
|_bin
|_sqlplus
|_lib
|_ libclntsh.so.10.1,libnnz10.so,libociei.so,libsqlplus.so
|_network
|_admin
|_tnsnames.ora
|_sqlplus
|_admin
|_glogin
|_mesg
|_sp1us.msb,sp1us.msg,sp1zhs.msb等
tnsnames.ora文件可以从x:\oracle\product\10.2.0\db_1\network\admin目录下拷贝即可,,这样您只要保证在windows下该文件配置正确即可。
三、环境变量配置
1、在/etc/profile文件里添加如下配置
oracle_home=/home/instantclient10_1
path=$oracle_home/bin:$path
ld_library_path=$oracle_home/lib:$ld_library_path
export oracle_home path ld_library_path
2、生效命令
#source profile
3、环境变量查看
#env |grep oracle_home
四、验证效果
使用sqlplus查询,如果出现如下信息,orale client基本安装完成。
用户名:username
密 码: password
服务名: myoracle
三项基本信息要根据你自己系统实际配置。
# sqlplus username/password@myoracle
sql*plus: release 10.1.0.5.0 - production on wed sep 7 11:26:13 2011
copyright (c) 1982, 2005, oracle. all rights reserved.
connected to:
oracle database 10g enterprise edition release 10.2.0.1.0 - production
with the partitioning, olap and data mining options
sql>
on other platforms the two packages should be unzipped into one directory, for example, /home/instantclient10_1 on unix or c:\instantclient10_1 on
四、动态库比较
windows. this table shows the oracle client-side files required to deploy sql*plus instant client 10.1.
platform
description
package
unix/linux
windows
sqlplus
sqlplus.exe
sql*plus executable
sql*plus
libsqlplus.so
not applicable
sql*plus library
glogin.sql
glogin.sql
sql*plus site profile
libclntsh.so.10.1
oci.dll
client code library
basic
libociei.so
oraociei10.dll
oci instant client data shared library