http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
a. instantclient-basic-linux.x64-11.2.0.4.0.zip
b. instantclient-jdbc-linux.x64-11.2.0.4.0.zip
c . instantclient-sdk-linux.x64-11.2.0.4.0.zip
d. instantclient-sqlplus-linux.x64-11.2.0.4.0.zip
a=> /usr/lib/oracle/11.2/client64/lib
b=> /usr/lib/oracle/11.2/client64/lib
c=> /usr/lib/oracle/11.2/client64/sdk
d=>/usr/lib/oracle/11.2/client64/lib
创建目录和文件连接:
$ sudo mkdir -p /usr/lib/oracle/11.2/client64/sqlplus/mesg
$ cd /usr/lib/oracle/11.2/client64/lib
$ sudo ln -s libclntsh.so.11.1 libclntsh.so
$ sudo ln -s libocci.so.11.1 libocci.so
$ sudo chown cl:cl ./*.so
$ sudo chmod 755 ./*.so
$ sudo vi /usr/lib/oracle/11.2/client64/network/admin/tnsnames.ora
内容如下:
ORADBSID =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ???.xxx.???.???)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)
增加下面内容:
# oracle 11g client x64
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME:$ORACLE_HOME/lib:$ORACLE_HOME/sdk/include
export ORACLE_SID=ORADBSID
export NLS_LANG="american_america.ZHS16GBK"
使生效:
. /etc/profile
$ sqlplus user/password@ORADBSID