Linux下安装DBD::Oracle、DBI和Ora2Pg

介质下载路径:

DBI:http://www.cpan.org/modules/by-module/DBI/

DBD:http://www.cpan.org/modules/by-module/DBD/

Ora2Pg:https://sourceforge.net/projects/ora2pg/files/

要求:perl 版本5.8以上, perl -v查看版本

使用root用户进行安装

1、安装DBI

[[email protected] DBI-1.627]$ perl Makefile.PL

*** Your LANG environment variable is set to ‘en_US.UTF-8‘

*** This may cause problems for some perl installations.

*** If you get test failures, please try again with LANG unset.

*** If that then works, please email [email protected] with details

*** including the output of ‘perl -V‘

Your perl was compiled with gcc (version 4.4.7 20120313 (Red Hat 4.4.7-14)), okay.

Creating test wrappers for DBD::Gofer:

t/zvg_01basics.t

t/zvg_02dbidrv.t

t/zvg_03handle.t

t/zvg_04mods.t

t/zvg_05concathash.t

t/zvg_06attrs.t

......

[[email protected] DBI-1.627]$ make

/usr/bin/perl -MExtUtils::Command -e ‘mkpath‘ -- blib/lib/DBI

rm -f blib/lib/DBI/Changes.pm

cp Changes blib/lib/DBI/Changes.pm

cp Driver_xst.h blib/arch/auto/DBI/Driver_xst.h

cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm

cp lib/DBI/Gofer/Response.pm blib/lib/DBI/Gofer/Response.pm

cp lib/DBI/Util/_accessor.pm blib/lib/DBI/Util/_accessor.pm

cp lib/DBI/Gofer/Transport/Base.pm blib/lib/DBI/Gofer/Transport/Base.pm

cp lib/DBD/DBM.pm blib/lib/DBD/DBM.pm

cp DBIXS.h blib/arch/auto/DBI/DBIXS.h

cp dbixs_rev.pl blib/lib/dbixs_rev.pl

cp lib/DBI/Gofer/Serializer/DataDumper.pm blib/lib/DBI/Gofer/Serializer/DataDumper.pm

cp lib/DBI/Const/GetInfoType.pm blib/lib/DBI/Const/GetInfoType.pm

cp lib/DBI/DBD/Metadata.pm blib/lib/DBI/DBD/Metadata.pm

cp lib/DBD/Gofer/Transport/pipeone.pm blib/lib/DBD/Gofer/Transport/pipeone.pm

cp lib/DBI/Const/GetInfo/ODBC.pm blib/lib/DBI/Const/GetInfo/ODBC.pm

cp lib/DBI/ProfileDumper/Apache.pm blib/lib/DBI/ProfileDumper/Apache.pm

cp lib/DBD/File/Roadmap.pod blib/lib/DBD/File/Roadmap.pod

......

[[email protected] DBI-1.627]$ make test(可选)

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, ‘blib/lib‘, ‘blib/arch‘)" t/*.t

t/01basics.t .................... ok

t/02dbidrv.t .................... ok

t/03handle.t .................... ok

t/04mods.t ...................... ok

t/05concathash.t ................ ok

t/06attrs.t ..................... ok

t/07kids.t ...................... ok

[[email protected] DBI-1.627]# make install

Files found in blib/arch: installing files in blib/lib into architecture dependent library tree

Installing /usr/local/lib64/perl5/auto/DBI/DBI.bs

Installing /usr/local/lib64/perl5/auto/DBI/dbixs_rev.h

Installing /usr/local/lib64/perl5/auto/DBI/dbivport.h

Installing /usr/local/lib64/perl5/auto/DBI/DBIXS.h

Installing /usr/local/lib64/perl5/auto/DBI/DBI.so

Installing /usr/local/lib64/perl5/auto/DBI/dbipport.h

Installing /usr/local/lib64/perl5/auto/DBI/dbi_sql.h

Installing /usr/local/lib64/perl5/auto/DBI/dbd_xsh.h

Installing /usr/local/lib64/perl5/auto/DBI/Driver_xst.h

Installing /usr/local/lib64/perl5/auto/DBI/Driver.xst

Installing /usr/local/lib64/perl5/dbixs_rev.pl

......

2、安装DBD:Oracle

配置环境变量

export ORACLE_BASE=/u02/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.4/db1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

安装

[[email protected] DBD-Oracle-1.74]# perl Makefile.PL 

Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 39

Using DBI 1.627 (for perl 5.010001 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/

Configuring DBD::Oracle for perl 5.010001 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 /u02/app/oracle/product/11.2.4/db1

DEFINE _SQLPLUS_RELEASE = "1102000400" (CHAR)

Oracle version 11.2.0.4 (11.2)

Found /u02/app/oracle/product/11.2.4/db1/rdbms/lib/ins_rdbms.mk

Using /u02/app/oracle/product/11.2.4/db1/rdbms/lib/ins_rdbms.mk

Your LD_LIBRARY_PATH env var is set to ‘/u02/app/oracle/product/11.2.4/db1/lib:‘

......

[[email protected] DBD-Oracle-1.74]# make

cp lib/DBD/Oracle/Troubleshooting/Cygwin.pod blib/lib/DBD/Oracle/Troubleshooting/Cygwin.pod

cp lib/DBD/Oracle.pm blib/lib/DBD/Oracle.pm

cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h

cp lib/DBD/Oracle/Troubleshooting/Hpux.pod blib/lib/DBD/Oracle/Troubleshooting/Hpux.pod

cp lib/DBD/Oracle/Troubleshooting/Vms.pod blib/lib/DBD/Oracle/Troubleshooting/Vms.pod

cp lib/DBD/Oracle/Troubleshooting/Linux.pod blib/lib/DBD/Oracle/Troubleshooting/Linux.pod

cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm

cp lib/DBD/Oracle/Troubleshooting.pod blib/lib/DBD/Oracle/Troubleshooting.pod

cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h

cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h

cp lib/DBD/Oracle/Troubleshooting/Sun.pod blib/lib/DBD/Oracle/Troubleshooting/Sun.pod

cp lib/DBD/Oracle/Troubleshooting/Macos.pod blib/lib/DBD/Oracle/Troubleshooting/Macos.pod

cp lib/DBD/Oracle/Troubleshooting/Aix.pod blib/lib/DBD/Oracle/Troubleshooting/Aix.pod

cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm

cp lib/DBD/Oracle/Troubleshooting/Win64.pod blib/lib/DBD/Oracle/Troubleshooting/Win64.pod

cp lib/DBD/Oracle/Troubleshooting/Win32.pod blib/lib/DBD/Oracle/Troubleshooting/Win32.pod

cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm

......

[[email protected] DBD-Oracle-1.74]# make test(可选)

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, ‘blib/lib‘, ‘blib/arch‘)" t/*.t

t/000-report-versions-tiny.t .. #

#

# Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10

# perl: 5.010001 (wanted 5.006) on linux from /usr/bin/perl

#

# B                                             => 1.22       (want any version)

# Carp                                          => 1.11       (want any version)

# DBI                                           => 1.627      (want 1.51)

......

[[email protected] DBD-Oracle-1.74]# make install

Files found in blib/arch: installing files in blib/lib into architecture dependent library tree

Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.h

Installing /usr/local/lib64/perl5/auto/DBD/Oracle/dbdimp.h

Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.bs

Installing /usr/local/lib64/perl5/auto/DBD/Oracle/mk.pm

Installing /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so

Installing /usr/local/lib64/perl5/auto/DBD/Oracle/ocitrace.h

Installing /usr/local/lib64/perl5/DBD/Oracle.pm

Installing /usr/local/lib64/perl5/DBD/Oracle/GetInfo.pm

Installing /usr/local/lib64/perl5/DBD/Oracle/Object.pm

Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting.pod

Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Win64.pod

Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Sun.pod

Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Win32.pod

Installing /usr/local/lib64/perl5/DBD/Oracle/Troubleshooting/Hpux.pod

......

3、检查脚本list.pl

[[email protected] ~]# cat list.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;
[[email protected] ~]# perl list.pl 
DBD::Oracle  --  1.74
DBI          --  1.627
Perl         --  5.10.1

DBD::Oracle和DBI安装完成

4、安装ora2pt

[[email protected] ora2pg-17.6]$ perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for Ora2Pg

Done...

------------------------------------------------------------------------------

Please read documentation at http://ora2pg.darold.net/ before asking for help

------------------------------------------------------------------------------

Now type: make && make install

[[email protected] ora2pg-17.6]# make && make install

Installing /usr/local/share/perl5/Ora2Pg.pm

Installing /usr/local/share/perl5/Ora2Pg/PLSQL.pm

Installing /usr/local/share/perl5/Ora2Pg/MySQL.pm

Installing /usr/local/share/perl5/Ora2Pg/GEOM.pm

Installing /usr/local/share/man/man3/ora2pg.3

Installing /usr/local/bin/ora2pg

Installing /usr/local/bin/ora2pg_scanner

Installing default configuration file (ora2pg.conf.dist) to /etc/ora2pg

Appending installation info to /usr/lib64/perl5/perllocal.pod

检查,DBD::Oracle DBI Ora2Pg安装完成

[[email protected] ~]# perl list.pl

DBD::Oracle  --  1.74

DBI          --  1.627

Ora2Pg       --  17.6b

Perl         --  5.10.1

参考文档:

http://www.askoracle.org/oracle/backup/1009.html

http://blog.sina.com.cn/s/blog_a32eff280102vmpn.html

时间: 2024-10-26 13:22:09

Linux下安装DBD::Oracle、DBI和Ora2Pg的相关文章

【Java】Linux下安装配置Oracle JDK 1.7版本

1 环境 Vmware虚拟机中的Ubuntu 12.04 32位系统 2具体安装步骤 ①下载最新的jdk包 注意jdk区分32位版本和64位版本,要与Ubuntu兼容才行 下载地址 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ②创建一个目录,解压压缩包 mkdir usr/lib/jvm 移动到该目录,并解压 [email protected]:/usr/lib$ sudo

Redhat linux下安装oracle11r2手册+截图_toto_V1.0

 在Linux下安装配置Oracle 11g R2详细过程(在整个过程中是在虚拟机下模拟的,虚拟机磁盘设置成了100GB) 1.Linux环境配置准备 环境:Linux:Redhat Enterprise 6,DB:Oracle 11gR2 X64,Oracle安装到/home/oralce_11目录下. 配置过程如下:(大部分是网上的内容,个人也是按照网上步骤来的) 1) 检查基本需求(对于牛逼的服务器来说,这个肯定是满足要求的,可以跳过) 内存大小 grep MemTotal /proc

linux下安装Oracle时交换空间不足的解决方法

摘:linux下安装Oracle时交换空间不足的解决方法 linux上安装Oracle时交换空间不足的解决办法 增加交换空间有两种方法: 严格的说,在系统安装完后只有一种方法可以增加swap,那就是本文的第二种方法, 至于第一种方法应该是安装系统时设置交换区. 1.使用分区: 在安装OS时划分出专门的交换分区,空间大小要事先规划好,启动系统时自动进行mount. 这种方法只能在安装OS时设定,一旦设定好不容易改变,除非重装系统. 2.使用swapfile:(或者是整个空闲分区) 新建临时swap

LINUX下安装Oracle后无法建监听

***********************************************声明**********************************************  原创作品,出自 "深蓝的blog" 博客,欢迎转载,转载时请务必注明出处,否则追究版权法律责任. 表述有错误之处,请您留言或邮件([email protected])指明,不胜感激. 本文转载必须保留此处:http://blog.csdn.net/huangyanlong/article/det

linux下安装oracle需要的配置

1.检查系统包安装情况 rpm -qa|grep binutils rpm -ivh sysstat-7.0.2.rpm binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3 (32 bit) elfutils-libelf-0.125 elfutils-libelf-devel-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-2.5-24 (32 bit

Linux下安装Oracle的过程和涉及的知识点-系列5

12.命令行启动 由于我是用VM进行安装的,所以首先需要修改默认启动为命令行的方式. 使用root登录,编辑/etc/inittab文件,将d:5:initdefault:改为d:3:initdefault: 知识点6:Linux的运行级别 # 0 - 停机(千万不能把initdefault 设置为0) # 1 - 单用户模式 # s init s = init 1 # 2 - 多用户,没有 NFS # 3 - 完全多用户模式(标准的运行级) # 4 - 没有用到 # 5 - X11 多用户图形

Ubuntu Linux下安装Oracle JDK

Ubuntu Linux下安装Oracle JDK Dennis Hu 2014-4-22 说明:因为非常多系统不支持使用OpenJDK,因此在ubuntu下会须要安装Oracle JDK.而Oracle JDK的安装貌似没有提供apt方式,因此安装Oracle JDK的方式相对麻烦一些,我常常安装,为了方便别人同一时候方便自己查看,把它记下来. 第一步:区分32位还是64位操作系统 先确定你的ubuntu linux是32位还是64位的,方法非常多,这里介绍一种就可以. $uname -a 第

Linux下安装oracle 11g数据库(一)

Linux下安装oracle 11g数据库(一) 1 内存的要求 最低配置: 1 GB of RAM 推荐配置: 2 GB of RAM or more 确定内存大小,输入下面的命令:grep MemTotal /proc/meminfo 确定系统版本,输入下面的命令:uname –m 确定交换空间的大小,输入下面的命令:grep SwapTotal /proc/meminfo 确定可用的内存和交换空间,输入下面的命令:free 2 磁盘空间要求 数据库软件 数据库软件需要的大小 企业版 4.7

Linux下安装Oracle 11g

1.环境 VMware 10 CentOS-6.3-x86_64 Oracle:linux.x64_11gR2 硬件上我分了2.5G的内存,30G硬盘(应该不需要这么大)2个U 2. 2.1 先把系统装上,root登陆之后需要改掉系统设置: setup命令关掉防火墙 vi /etc/selinux/config 把SELINUX的值改成disabled,然后wq存盘退出 2.2 查阅了我下载的11G的文档里面linux下Oracle需要的软件(E11882_01,貌似解压了有2.22G)列表如下