安装oracle即时客户端
admin
2023-05-02 12:44:10
0

一、需求

    数据库和应用没在同一台主机上,所以需要安装oracle即时客户端,也可以是oracle的客户端。只不过客户端比较庞大。

二、安装oracle即时客户端

下载Oracle即时客户端程序包

http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

数据库版本是11.2.0.3.0

Instant Client Package - Basic:

All files required to run OCI, OCCI, and JDBC-OCI applications

Image instantclient-basic-linux.x64-11.2.0.3.0.zip (60,331,694 bytes) (cksum - 3890813254)

oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm (59,492,344 bytes) (cksum - 3293107452) 

*Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client

instantclient-sqlplus-linux.x64-11.2.0.3.0.zip (837,574 bytes) (cksum - 3996754029)

oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm (831,586 bytes) (cksum - 2150224972)

*Instant Client Package - SDK:

Additional header files and an example makefile for developing Oracle applications with Instant Client

instantclient-sdk-linux.x64-11.2.0.3.0.zip (641,586 bytes) (cksum - 1205517808)

oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm (609,139 bytes) (cksum - 2701969031)

zip 或者 rpm 包选择一种,系统是centos,天生兼容RHEL,所以选择rpm格式的。

以64位为例,下载以下几个文件:

oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm

oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm

oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm

下载完以后装上。 rpm -Uhv

[root@mpaydb tmp]# rm -f oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm 

ll -h 

total 71M 

-rw-r--r--  1 root root  57M Jun  9 09:39 oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64(1).rpm 

-rw-r--r--  1 root root 595K Jun  8 18:01 oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm 

-rw-r--r--  1 root root 813K Jun  8 18:01 oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm 

drwxrwxr-x 13 1000 1000 4.0K Jun  8 17:11 tmp-2.0.6 

-rw-r--r--  1 root root  13M Apr 22 20:34 tmp-2.0.6.tar.gz 

[root@mpaydb tmp]# 

[root@mpaydb tmp]# rpm -Uhv oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64\(1\).rpm 

99%)########################################### [100%] 

[root@mpaydb tmp]# 

[root@mpaydb tmp]# rpm -Uhv oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm 

Preparing...                                                            (100%)#                                           (100%)##                                   99%)########################################### [100%] 

[root@mpaydb tmp]# 

[root@mpaydb tmp]# rpm -Uhv oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm sqlplus-11.2.0.3.0-1.x86_64.rpm 

Preparing...                                                            (100%)#                                           (100%)##    

(100%)########################################### [100%] 

[root@mpaydb tmp]# 

[root@mpaydb tmp]# rpm -qa|grep oracle 

oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64 

oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64 

oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64 

[root@mpaydb client64]# pwd 

/usr/lib/oracle/11.2/client64 

[root@mpaydb client64]# cd bin/ 

[root@mpaydb bin]# 

[root@mpaydb bin]# ./sqlplus 

./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory 

[root@mpaydb bin]#

添加 Oracle libraries

[root@mpaydb tmp-2.0.6]# more /etc/ld.so.conf.d/oracle.conf 

/usr/lib/oracle/11.2/client64/lib 

[root@mpaydb tmp-2.0.6]#

[root@mpaydb bin]# ldconfig 

[root@mpaydb bin]# ./sqlplus 

SQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 9 10:24:26 2013 

Copyright (c) 1982, 2011, Oracle.  All rights reserved. 

Enter user-name: 

ERROR: 

ORA-12162: TNS:net service name is incorrectly specified 

Enter user-name: ^C 

[root@mpaydb bin]#

测试一下:

[root@mpaydb oracle]# sqlplus tmp/111111@10.101.5.77/MOMORAC.momo.org 

SQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 9 12:21:29 2013 

Copyright (c) 1982, 2011, Oracle.  All rights reserved. 

Connected to: 

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production 

With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security, 

OLAP, Data Mining, Oracle Database Vault and Real Application Testing options 

SQL>


相关内容

热门资讯

国家数据局:支持地方通过“以数... 记者从国家数据局了解到,“数据要素×”城市行活动今天在南京启动,国家层面将支持各地积极挖...
河南多地出现巨大“不明飞行物”... 5月12日晚8点左右,安阳、新乡、焦作……河南多地夜空中出现一团发光“水母云”。这到底是什么东西呢?...
外交部:中方欢迎特朗普总统对中... 5月13日,外交部发言人郭嘉昆主持例行记者会。有记者就美国总统特朗普访华行前的相关言论提问。郭嘉昆表...
外交部质问日本右翼势力:是要打... 外交部:日本重走军国主义的回头路是一条不归路5月13日,外交部发言人郭嘉昆主持例行记者会。有记者问:...
2025年许昌市国民经济和社会... 【大河财立方消息】 5月12日,许昌市统计局、国家统计局许昌调查队发布2025年许昌市国民经济和社会...
我国首条深水油气装备工艺管线智... (来源:中国水运网) 转自:中国水运网 5月10日,海洋石油工程股份有限公司(简称“海油工程”)发布...
成都中科唯实申请一种真空蝶阀专... 国家知识产权局信息显示,成都中科唯实仪器有限责任公司申请一项名为“一种真空蝶阀”的专利,公开号CN1...
华为充电宝怎么样?西圣、图拉斯... 现如今市面上的选择可见是越来越多了,但“踩雷”情况也很常见:有的看起来容量大、实际给手机充电虚标非常...
智己汽车充电地图接入华为超充 ... 【CNMO科技消息】5月13日,智己汽车宣布,华为超充已正式上线其充电地图服务。即日起,智己用户可通...
爆火短剧《enemy》导演否认... 近日,短剧《enemy》凭借震撼人心的台词与浓烈的家国情怀爆火出圈。据钱江视频,5月13日,《ene...