下载基本包:
下载以下三个压缩包:
|
参考官网的安装简介:
1. Download the desired Instant Client ZIP files. All installations require the Basic or Basic Lite package.
2. Unzip the packages into a single directory such as "/opt/oracle/instantclient_12_1" that is accessible to your application.
3. Create the appropriate libclntsh.so and libocci.so links for the version of Instant Client. For example:
cd /opt/oracle/instantclient_12_1 ln -s libclntsh.so.12.1 libclntsh.so ln -s libocci.so.12.1 libocci.so
4. Set the environment variable LD_LIBRARY_PATH to the directory created in Step 2, for example:
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1:$LD_LIBRARY_PATH
Alternatively, add this path to an ldconfig configuration file if there is no other Oracle software that will be impacted.
5. To use supplied binaries such as SQL*Plus, update your PATH environment variable, for example:
export PATH=/opt/oracle/instantclient_12_1:$PATH
ln -s libocci.so.11.1 libocci.so
ln -s libclntsh.so.11.1 libclntsh.so
# tnsnames.ora Network Configuration File: # Generated by Oracle configuration tools. test = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521)) ) (CONNECT_DATA = (SID = test) ) )
[root@hadoop001 instantclient_11_2]# sqlplus test/test123@test
SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 24 00:20:02 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>