http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
安裝
yum localinstall oracle-instantclient11.2-*
創建sqlnet.ora和tnsnames.ora兩個檔案
mkdir -p /usr/lib/oracle/11.2/client64/network/admin cd /usr/lib/oracle/11.2/client64/network/admin [root@localhost admin]# cat sqlnet.ora NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT) ADR_BASE = /usr/lib/oracle/ [root@localhost admin]# cat tnsnames.ora XXX = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.0.2)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DB) ) )
~/.bash_profile
ORACLE_HOME=/usr/lib/oracle/11.2/client64 PATH=$ORACLE_HOME/bin:$PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib export ORACLE_HOME export LD_LIBRARY_PATH export TNS_ADMIN=$ORACLE_HOME/network/admin export PATH
sqlplus "username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.1)(PORT=1521))(CONNECT_DATA=(SID=YOURSID)))"