安裝oracle即時用戶端

來源:互聯網
上載者:User

標籤:required   oracle   

一、需求

    資料庫和應用沒在同一台主機上,所以需要安裝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

[[email protected] 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 

[[email protected] tmp]# 

[[email protected] tmp]# rpm -Uhv oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64\(1\).rpm 

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

[[email protected] tmp]# 

[[email protected] tmp]# rpm -Uhv oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm 

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

[[email protected] tmp]# 

[[email protected] 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%] 

[[email protected] tmp]# 

[[email protected] 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 

[[email protected] client64]# pwd 

/usr/lib/oracle/11.2/client64 

[[email protected] client64]# cd bin/ 

[[email protected] bin]# 

[[email protected] bin]# ./sqlplus 

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

[[email protected] bin]#

添加 Oracle libraries

[[email protected] tmp-2.0.6]# more /etc/ld.so.conf.d/oracle.conf 

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

[[email protected] tmp-2.0.6]#

[[email protected] bin]# ldconfig 

[[email protected] 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 

[[email protected] bin]#

測試一下:

[[email protected] oracle]# sqlplus tmp/[email protected]/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>


本文出自 “旅遊人生” 部落格,請務必保留此出處http://felixgzf.blog.51cto.com/4108324/1792505

安裝oracle即時用戶端

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.