国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Linux > 正文

Linux安裝DBI/DBD-ORACLE

2024-06-28 13:20:14
字體:
供稿:網(wǎng)友
linux安裝DBI/DBD-Oracle 2015-06-08 16:38 by 瀟湘隱者, ... 閱讀, ... 評(píng)論, 收藏, 編輯

本文只是學(xué)習(xí)如何配置PERL DBI、PERL DBD時(shí),整理的一個(gè)學(xué)習(xí)實(shí)踐文檔,大部分參考網(wǎng)上資料,詳情請(qǐng)見下面參考資料。

PERL對(duì)數(shù)據(jù)庫的支持廣而且全,幾乎所有的主流數(shù)據(jù)庫都有與之相應(yīng)的PERL模塊支持。為了開發(fā)可在不同數(shù)據(jù)庫上移植的PERL應(yīng)用,DBI(DataBase Interface)模塊應(yīng)運(yùn)而生,使用這個(gè)模塊,應(yīng)用只需使用統(tǒng)一的接口便能操作不同的數(shù)據(jù)庫,真正實(shí)現(xiàn)了可移植;當(dāng)然,這個(gè)DBI也配備有相應(yīng)的開關(guān)來支持不同數(shù)據(jù)庫的各種特性。

DBI只是個(gè)抽象層,要實(shí)現(xiàn)支持不同的數(shù)據(jù)庫,則需要在DBI之下,編寫針對(duì)不同數(shù)據(jù)庫的驅(qū)動(dòng)。對(duì)MySQL來說,有DBD::Mysql, 而對(duì)ORACLE來說,則是DBD::Oracle。其中的DBD這是DataBase Driver的簡寫。

安裝順序是先裝DBI,再裝DBD::Oracle,DBD::Oracle模塊不是Oracle官方開發(fā)的,而是由Pythian Group這個(gè)很有名的DBA咨詢公司組織專人開發(fā),目前的最新版本是1.74,主頁在http://www.pythian.com/resources/dba-resources/dbdoracle-PRoject/,讀者可以到那里找到關(guān)于此模塊的最新動(dòng)態(tài)。

1:檢查當(dāng)前系統(tǒng)的Perl版本

[root@getlnx01 ~]# perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

2: 檢查驗(yàn)證系統(tǒng)中安裝了哪些Perl modules

check.pl腳本

#!/usr/bin/perl
use strict;
use ExtUtils::Installed;
my $inst=ExtUtils::Installed->new();
my @modules = $inst->modules();
foreach(@modules){
 my $ver = $inst->version($_) || "???";
 printf("%-12s -- %s/n",$_,$ver);
}
exit;
[root@getlnx01 tmp]# chmod +x check.pl 
[root@getlnx01 tmp]# perl check.pl 
Perl -- 5.8.8

clip_image001

3:具體安裝步驟

[root@getlnx01 tmp]# tar xvf DBI-1.627.tar 
[root@getlnx01 tmp]# cd DBI-1.627
[root@getlnx01 DBI-1.627]# perl Makefile.PL 
[root@getlnx01 DBI-1.627]# make
[root@getlnx01 DBI-1.627]# make test
[root@getlnx01 DBI-1.627]# make install

clip_image002

二: 安裝DBD-ORACLE組件,安裝步驟簡單如下所示:

[root@getlnx01 DBI-1.627]# cd /tmp
[root@getlnx01 tmp]# tar zxf DBD-Oracle-1.64.tar 
[root@getlnx01 tmp]# cd DBD-Oracle-1.64
[root@getlnx01 DBD-Oracle-1.64]# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1; 
[root@getlnx01 DBD-Oracle-1.64]# export PATH=$ORACLE_HOME/bin:$PATH; 
[root@DB-Server DBD-Oracle-1.64]# export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
[root@DB-Server DBD-Oracle-1.64]# perl Makefile.PL 
[root@getlnx01 DBD-Oracle-1.64]# perl Makefile.PL 
Using DBI 1.627 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/
Configuring DBD::Oracle for perl 5.008008 on linux (x86_64-linux-thread-multi)
Remember to actually *READ* the README file! Especially if you have any problems.
Installing on a linux, Ver#2.6
Using Oracle in /u01/app/oracle/product/10.2.0/db_1
DEFINE _SQLPLUS_RELEASE = "1002000400" (CHAR)
Oracle version 10.2.0.4 (10.2)
Found /u01/app/oracle/product/10.2.0/db_1/rdbms/demo/demo_rdbms.mk
Found /u01/app/oracle/product/10.2.0/db_1/rdbms/demo/demo_rdbms64.mk
Found /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk
Using /u01/app/oracle/product/10.2.0/db_1/rdbms/demo/demo_rdbms.mk
Your LD_LIBRARY_PATH env var is set to '/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib'
Reading /u01/app/oracle/product/10.2.0/db_1/rdbms/demo/demo_rdbms.mk
Reading /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/env_rdbms.mk
Attempting to discover Oracle OCI build rules
gcc -c -o DBD_ORA_OBJ.o DBD_ORA_OBJ.c
by executing: [make -f /u01/app/oracle/product/10.2.0/db_1/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
Oracle oci build command:

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 荥经县| 岳西县| 邹平县| 奎屯市| 来凤县| 大余县| 荥阳市| 石城县| 吉安市| 甘德县| 桐城市| 镇远县| 潼关县| 汽车| 且末县| 麻阳| 芦山县| 江陵县| 鞍山市| 宣城市| 明溪县| 泰和县| 绵阳市| 新巴尔虎左旗| 嘉鱼县| 德安县| 万载县| 康保县| 富阳市| 乌恰县| 如皋市| 鞍山市| 霍林郭勒市| 慈利县| 神木县| 郎溪县| 江永县| 太谷县| 湖南省| 田林县| 砚山县|