官方地址: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
instantclient-sqlplus-linux.x64-11.2.0.4.0.zip
instantclient-basic-linux.x64-11.2.0.4.0.zip
将以上两个包放到/home/oracle/ 后,并解压
修改环境变量
ORACLE_HOME=/home/oracle/instantclient_11_2
TNS_ADMIN=/home/oracle/instantclient_11_2/network/admin/
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$ORACLE_HOME:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME:/lib:/usr/lib; export LD_LIBRARY_PATH
在/home/oracle/instantclient_11_2目录下新建目录 network/admin/ 以及 tnsnames.ora文件。
修改 tns文件
DG1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.27.133.233)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = wnm)
)
)
测试sqlplus
[oracle@wnmpreapp41 instantclient_11_2]$ sqlplus wnm/wnm@DG1
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 20 10:36:17 2024
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
标签:11,instantclient,0.4,home,oracle,PATH,安装,下载
From: https://www.cnblogs.com/Miac/p/18258268