ORACLE Instant Client 安装

一:综述

    我们安装oracle 数据库软件时,会默认的安装客户端,但是有些时候我们可能不需要安装oracle数据库软件,只是需要安装某一个客户端。例如 我想在某台应用服务器上使用sql*plus客户端登录另一台服务器上的数据库,那么我就需要安装sql*plus客户端。


二:Instant Client downloads >>下载oracle instant Client包

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html 


三:oracle 客户端安装方法(下面的安装方法 出自oracle官方文档)

 See the Instant ClientHome Page for more information.  >>关于Instant Client安装更详细的信息请参考Instant ClientHome Page

1. Installation of ZIPfiles: >>zip包安装方


1). Download the desired Instant Client ZIP files. Allinstallations require the Basic or Basic Lite package. >>下载相应版本的zip(所有的客户端安装都必须安装Basic 或者BasicLite)

2). Unzip the packages into a single directory such as"/opt/oracle/instantclient_12_1" that is accessible to yourapplication.

>>解压缩zip包到相应的目录下

3). Create the appropriate libclntsh.so and libocci.so linksfor the version of Instant Client. For example: >>建立libclntsh.solibocci.so软连接

cd/opt/oracle/instantclient_12_1

ln -slibclntsh.so.12.1 libclntsh.so

ln -slibocci.so.12.1 libocci.so


4). Set the environment variable LD_LIBRARY_PATH to thedirectory created in Step 2, for example: >>设置LD_LIBRARY_PATH环境变量

 

export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1:$LD_LIBRARY_PATH


Alternatively, add this path to an ldconfig configuration file if there is noother Oracle software that will be impacted. >>也可以把LD_LIBRARY_PATH路径加入到idconfig配置文件,这样不会影响到环境下其他oracle软件

5). To use supplied binaries such as SQL*Plus, update yourPATH environment variable, for example: >>sql*plus路径加入环境变量

 

exportPATH=/opt/oracle/instantclient_12_1:$PATH


6). Start your application. >>可以使用sqlplus


2. Installation of RPMs: >>使用rpm包安装


1). Download the desired Instant Client RPM packages. Allinstallations require the Basic or Basic Lite RPM.  >>下载影响的rpm(所有的客户端安装都必须安装Basic 或者Basic Lite)

 

2). As the root user, installthe packages with "rpm". For example: >>root用户安装rpm包,例如:

 

rpm -ivhoracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm



3). Set the environmentvariable LD_LIBRARY_PATH to the appropriate directory for the Instant Clientversion, for example: >>设置LD_LIBRARY_PATH环境变量

 

exportLD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH


Alternatively, add this path to an ldconfig configuration file if there is noother Oracle software that will be impacted. >>也可以把LD_LIBRARY_PATH路径加入到idconfig配置文件,这样不会影响到环境下其他oracle软件

4). To use supplied binaries such as SQL*Plus, update yourPATH environment variable, for example: >>sql*plus加入环境变量


exportPATH=/usr/lib/oracle/12.1/client64/bin:$PATH



5). Start your application. >>可以使用sql*plus

 


你可能感兴趣的:(ORACLE数据库)