Oracle官方原文如下:
对于Windows:
Installation
See the Instant Client Home Page for more information about Instant Client packages.
Client-server version interopability is detailed in Doc ID 207303.1. For example, Oracle Call Interface 18.3 and 12.2 can connect to Oracle Database 11.2 or later. Some tools may have other restrictions.
1. Download the appropriate Instant Client packages for your platform. All installations require the Basic or Basic Light package.
2. Unzip the packages into a single directory such as
C:\oracle\instantclient_12_2
3. Add this directory to the
PATH
environment variable. If you have multiple versions of Oracle libraries installed, make sure the new directory occurs first in the path4. Download and install the correct Visual Studio Redistributable from Microsoft. Instant Client 12.2 requires the Visual Studio 2013 redistributable. Instant Client 12.1 requires the Visual Studio 2010 redistributable. Instant Client 11.2 requires the Visual Studio 2005 redistributable.
5. If you intend to co-locate optional Oracle configuration files such as tnsnames.ora, sqlnet.ora, ldap.ora, or oraaccess.xml with Instant Client, then create a subdirectory
C:\oracle\instantclient_12_2\network\admin
This is the default Oracle client configuration directory for applications linked with this Instant Client.
Alternatively, Oracle client configuration files can be put in another, accessible directory. Then set the environment variable TNS_ADMIN to that directory name.
6. Start your application.
对于Linux:
Installation
For general Instant Client information, see the Home Page.
ODBC users should follow the ODBC Installation Instructions.
Oracle Linux users with a ULN Subscription may prefer to install Oracle Instant Client from the ol7_x86_64_instantclient or ol6_x86_64_instantclient channels.
Client-server version interopability is detailed in Doc ID 207303.1. For example, Oracle Call Interface 18.3 can connect to Oracle Database 11.2 or later. Some tools may have other restrictions.
Installation of ZIP files:
1. Download the desired Instant Client ZIP files. All installations require the Basic or Basic Light package.2. Unzip the packages into a single directory such as
/opt/oracle/instantclient_18_3
that is accessible to your application. For example:cd /opt/oracle unzip instantclient-basic-linux.x64-18.3.0.0.0dbru.zip
3. Prior to version 18.3, create the appropriate links for the version of Instant Client. For example:
cd /opt/oracle/instantclient_12_2 ln -s libclntsh.so.12.1 libclntsh.so ln -s libocci.so.12.1 libocci.so
4. Install the
libaio
package. This is calledlibaio1
on some Linux distributions.For example, on Oracle Linux, run:
sudo yum install libaio
5. If Instant Client is the only Oracle Software installed on this system then update the runtime link path, for example:
sudo sh -c “echo /opt/oracle/instantclient_18_3 > \ /etc/ld.so.conf.d/oracle-instantclient.conf” sudo ldconfig
Alternatively, set the
LD_LIBRARY_PATH
environment variable prior to running applications. For example:export LD_LIBRARY_PATH=/opt/oracle/instantclient_18_3:$LD_LIBRARY_PATH
The variable can optionally be added to configuration files such as
~/.bash_profile
and to application configuration files such as/etc/sysconfig/httpd
6. If you intend to co-locate optional Oracle configuration files such as
tnsnames.ora
,sqlnet.ora
,ldap.ora
, ororaaccess.xml
with Instant Client, put them in thenetwork/admin
subdirectory. This needs to be created for 12.2 and earlier, for example:mkdir -p /opt/oracle/instantclient_12_2/network/admin
This is the default Oracle configuration directory for applications linked with this Instant Client.
Alternatively, Oracle configuration files can be put in another, accessible directory. Then set the environment variable
TNS_ADMIN
to that directory name.7. To use binaries such as sqlplus from the SQL*Plus package, unzip the package to the same directory as the Basic package and then update your
PATH
environment variable, for example:export PATH=/opt/oracle/instantclient_18_3:$PATH
8. Start your application.
1. Download the desired Instant Client RPM packages. All installations require the Basic or Basic Light RPM.
2. Install the packages with
yum
. For example:sudo yum install oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm
3. If Instant Client is the only Oracle Software installed on this system then update the runtime link path, for example:
sudo sh -c “echo /usr/lib/oracle/18.3/client64/lib > \ /etc/ld.so.conf.d/oracle-instantclient.conf” sudo ldconfig
Alternatively, set the
LD_LIBRARY_PATH
environment variable prior to running applications. For example:export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib:$LD_LIBRARY_PATH
The variable can optionally be added to configuration files such as
~/.bash_profile
and to application configuration files such as/etc/sysconfig/httpd
4. If you intend to co-locate optional Oracle configuration files such as
tnsnames.ora
,sqlnet.ora
ldap.ora
, ororaaccess.xml
with Instant Client, put them in thenetwork/admin
subdirectory. This needs to be created for 12.2 and earlier, for example:sudo mkdir -p /usr/lib/oracle/12.2/client64/lib/network/admin
This is the default Oracle configuration directory for applications linked with this Instant Client.
Alternatively, Oracle configuration files can be put in another, accessible directory. Then set the environment variable
TNS_ADMIN
to that directory name.5. To use binaries such as sqlplus from the SQL*Plus package, use
yum
to install the package and then update yourPATH
environment variable, for example:export PATH=/usr/lib/oracle/18.3/client64/bin:$PATH
6. Start your application.