iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >ora2pg的使用(一、centos下的安装)
  • 282
分享到

ora2pg的使用(一、centos下的安装)

2024-04-02 19:04:59 282人浏览 安东尼
摘要

1、Requirement [root@Centos1 ~]# perl -v This is perl 5, version&nbs

1、Requirement

[root@Centos1 ~]# perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi(with 38 reGIStered patches, see perl -V for more detail)
[root@centos1 ~]# GCc -vUsing built-in specs.COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/usr/local/gcc-9.2.0/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapperTarget: x86_64-pc-linux-gnugcc version 9.2.0 (GCC)
[root@centos1 ~]# yum install perl-DBI perl-DBD-Pg perl-ExtUtils-MakeMaker  perl-Time-HiRes

2、 安装oracle客户端或者服务端(这里是已经安装了oracle11g服务端)

参考 Http://www.cnblogs.com/zydev/p/7213845.html

配置root用户下 Oracle环境变量,因为准备将ora2pg在root下执行

[root@centos1 ~]# echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_1
[root@centos1 ~]# echo $LD_LIBRARY_PATH
/u01/app/oracle/product/11.2.0/dbhome_1/lib:/lib:/usr/lib
[root@centos1 DBD-Oracle-1.80]# echo $ORACLE_BASE
/u01/app/oracle

3 、安装DBI,DBD::Oracle
DBI只是个抽象层,要实现支持不同的数据库,则需要在DBI之下,编写针对不同数据库的驱动。对Mysql来说,有DBD::mysql, 而对ORACLE来说,则是DBD::Oracle。其中的DBD这是DataBase Driver的简写。安装顺序是先装DBI,再装DBD::Oracle
介质下载路径:

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

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

安装DBI

[root@centos1 opt]# tar -zxvf DBI-1.642.tar.gz
[root@centos1 opt]# cd DBI-1.642/
[root@centos1 DBI-1.642]# perl Makefile.PL   I see you're using perl 5.016003 on x86_64-linux-thread-multi, okay.    Remember to actually *read* the README file!    Use  'make' to build the software (dmake or nmake on windows).    Then 'make test' to execute self tests.    Then 'make install' to install the DBI and then delete this working    directory before unpacking and building any DBD::* drivers.
Writing Makefile for DBI
[root@centos1 DBI-1.642]# make
[root@centos1 DBI-1.642]# make install

安装DBD:Oracle

[root@centos1 opt]# tar zxvf DBD-Oracle-1.80.tar.gz
[root@centos1 DBD-Oracle-1.80]# perl Makefile.PLChecking if your kit is complete...Looks GoodLD_RUN_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/libUsing DBD::Oracle 1.80.Using DBD::Oracle 1.80.Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 1807.Using DBI 1.642 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/Writing Makefile for DBD::Oracle
[root@centos1 DBD-Oracle-1.80]#  make[root@centos1 DBD-Oracle-1.80]# make install


检查安装

[root@centos1 opt]# vi 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;
[root@centos1 opt]# perl list.pl DBD::Oracle  --  1.80DBI          --  1.642Perl         --  5.16.3

4、安装ora2pg

https://GitHub.com/darold/ora2pg/releases

[root@centos1 opt]# tar -zxvf ora2pg-20.0.tar.gz
[root@centos1 opt]# cd ora2pg-20.0/
[root@centos1 ora2pg-20.0]#  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

[root@centos1 ora2pg-20.0]# make && make install
[root@centos1 ora2pg-20.0]# whereis ora2pgora2pg: /etc/ora2pg /usr/local/bin/ora2pg
[root@centos1 opt]# perl list.pl 
DBD::Oracle  --  1.80
DBI          --  1.642
Ora2Pg       --  20.0
Perl         --  5.16.3

环境变量

[root@centos1 opt]# export PERL5LIB=/usr/local/bin/
[root@centos1 opt]# source /etc/profile

安装完成,接下来测试从oracle到postgres的数据迁移 查看 ora2pg的使用(二、ora2pg的配置及oracle向postgres数据迁移)

您可能感兴趣的文档:

--结束END--

本文标题: ora2pg的使用(一、centos下的安装)

本文链接: https://www.lsjlt.com/news/49898.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • ora2pg的使用(一、centos下的安装)
    1、Requirement [root@centos1 ~]# perl -v This is perl 5, version&nbs...
    99+
    2024-04-02
  • centos下gitlab一键安装包
    CentOS下GitLab一键安装包GitLab是一个开源的Git代码托管管理平台,可用于团队合作、代码共享、版本控制等。它支持多种操作系统,包括CentOS。本文将介绍CentOS下GitLab的一键安装包及其使用方法。一、安装前的准备工...
    99+
    2023-10-22
  • CentOS 7.5下FFmpeg如何安装使用
    小编给大家分享一下CentOS 7.5下FFmpeg如何安装使用,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!FFmpeg是一套采用LGPL或GPL许可证的开源计...
    99+
    2023-06-28
  • centos下coreseek怎么安装及使用
    在CentOS下安装和使用Coreseek可以按照以下步骤进行操作:1. 安装依赖软件:```sudo yum install gc...
    99+
    2023-08-26
    centos coreseek
  • CentOS下怎么安装并使用ProFTPd
    本篇内容介绍了“CentOS下怎么安装并使用ProFTPd”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!安装:安装EPEL软件包代码如下:r...
    99+
    2023-06-10
  • centOs下怎么安装和使用DenyHosts
    这篇文章主要介绍了centOs下怎么安装和使用DenyHosts的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇centOs下怎么安装和使用DenyHosts文章都会有所收获,下面我们一起来看看吧。DenyHos...
    99+
    2023-06-28
  • centos下coreseek安装及使用方法
    在CentOS下安装和使用Coreseek的步骤如下:1. 安装所需依赖:Coreseek依赖于MySQL和其它一些库,可以通过以下...
    99+
    2023-08-25
    centos
  • centos下安装python3的方法
    在https://www.Python.org/ftp/python/下找到您所需的python版本如https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz下载pythonwget ...
    99+
    2023-01-31
    方法 centos
  • CentOS下mysql的安装过程
    这篇文章主要介绍“CentOS下mysql的安装过程”,在日常操作中,相信很多人在CentOS下mysql的安装过程问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CentOS下mysql的安装过程”的疑惑有所...
    99+
    2023-06-16
  • centos下安装nginx的步骤
    本篇内容主要讲解“centos下安装nginx的步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“centos下安装nginx的步骤”吧!下载[root@ticent ~]# wget http...
    99+
    2023-06-04
  • Centos下怎么安装和使用Docker CE
    本篇内容主要讲解“Centos下怎么安装和使用Docker CE”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Centos下怎么安装和使用Docker CE”吧!前提条件目前,CentOS 仅发...
    99+
    2023-06-28
  • Mongodb学习(安装篇): 在centos下的安装
      安装篇  ###下载解压文件 [root@192 lamp]# wget http://fastdl.mongodb.org/lin...
    99+
    2024-04-02
  • CentOS 5.4下的Memcache怎么安装
    本篇内容介绍了“CentOS 5.4下的Memcache怎么安装”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所...
    99+
    2024-04-02
  • CentOS 7下ActiveMQ的安装配置
    本篇内容介绍了“CentOS 7下ActiveMQ的安装配置”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!下载安装wget ...
    99+
    2023-06-05
  • Centos安装使用Chro
    一、安装Chrome 我安装好Centos系统后,就在网上去找Chrome浏览器的安装方法,使用过yum,rpm都安装不上,会报错,然后询问公司的运维,他给我了个包,然后使用:yum localinstall 包名 就安装成功了,安装的路...
    99+
    2023-01-30
    Centos Chro
  • 如何在CentOS下使用yum安装xen 4.2.
    本篇内容主要讲解“如何在CentOS下使用yum安装xen 4.2.”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“如何在CentOS下使用yum安装xen 4.2.”吧!1.下载kernel-x...
    99+
    2023-06-10
  • CentOS下怎么使用OpenSSL编译安装OpenSSH
    这篇“CentOS下怎么使用OpenSSL编译安装OpenSSH”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“CentOS下...
    99+
    2023-06-28
  • CentOS 7下yum安装Apache的方法
    这篇文章主要介绍“CentOS 7下yum安装Apache的方法”,在日常操作中,相信很多人在CentOS 7下yum安装Apache的方法问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CentOS 7下yu...
    99+
    2023-06-05
  • CentOS下安装Jenkins的完整步骤
    目录一、Jenkins 是什么?二、准备工作三、下载四、启动五、安装六、配置1.Global Tool Configuration(全局工具配置)总结 一、Jenkins ...
    99+
    2024-04-02
  • 怎么使用CentOS GitLab一键安装包来进行安装
    本文小编为大家详细介绍“怎么使用CentOS GitLab一键安装包来进行安装”,内容详细,步骤清晰,细节处理妥当,希望这篇“怎么使用CentOS GitLab一键安装包来进行安装”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来...
    99+
    2023-07-05
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作