0% found this document useful (0 votes)
264 views8 pages

Step-By-Step Guide To Install Ora2pg On Linux

This document is a step-by-step guide for installing ora2pg on a Linux machine to facilitate the migration of data from Oracle to Azure Database for PostgreSQL. It outlines the necessary pre-requisites, including the installation of Perl, Oracle Instant Client, and the DBD::Oracle Perl Module, followed by detailed installation instructions for each component. The guide is tailored for Red Hat Enterprise Linux 7.4 and includes commands for installation and testing of ora2pg.

Uploaded by

droppdrill
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
264 views8 pages

Step-By-Step Guide To Install Ora2pg On Linux

This document is a step-by-step guide for installing ora2pg on a Linux machine to facilitate the migration of data from Oracle to Azure Database for PostgreSQL. It outlines the necessary pre-requisites, including the installation of Perl, Oracle Instant Client, and the DBD::Oracle Perl Module, followed by detailed installation instructions for each component. The guide is tailored for Red Hat Enterprise Linux 7.4 and includes commands for installation and testing of ora2pg.

Uploaded by

droppdrill
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Step-by-Step guide to Install

ora2pg on Linux

Prepared by

Paula Berenguel

DM Jumpstart Engineering Architect

[email protected]

Dec-2018
This document is meant to be used as a Quick Installation Guide for enabling
migration of schema & data from Oracle to Azure Database for PostgreSQL using
ora2pg tool. Complete details on the tool can be found at
http://ora2pg.darold.net/documentation.html

Pre-Requisites
The following software must be installed on the Linux machine prior to installing ora2pg:

 Perl 5.10 or more

 Oracle Instant Client or Full Oracle installation

 DBD::Oracle Perl Module

 ora2pg

It is recommended that you use the order above to proceed with the installation.

Note that this guide was based on a Red Hat Enterprise Linux 7.4 virtual machine. I recommend to install
everything using root user, for simplicity.

Installing Perl 5.10 or more


1) Install GCC first – not all versions of Linux comes with gcc installed. As root:

yum install gcc

2) Create a directory for the Perl installation.

mkdir app
cd app

3) Download Perl

wget https://www.cpan.org/src/5.0/perl-5.28.0.tar.gz
4) Untar/unzip Perl

tar -xzf perl-5.28.0.tar.gz

5) Navigate to the Perl folder and configure $HOME (This will run for a while…)

cd perl-5.28.0
./Configure -des -Dprefix=$HOME/

6) Install Perl (it will take a while…)

make
make test
make install
7) Once steps 1-6 are executed, check the (new) version of Perl by typing

$HOME/bin/perl -v

8) Make this Perl installation the default one by adding the path to .bashrc file

export PATH=$HOME/bin/:$PATH

All commands:

yum install gcc


mkdir app
cd app
wget https://www.cpan.org/src/5.0/perl-5.28.0.tar.gz
tar -xzf perl-5.28.0.tar.gz
cd perl-5.28.0
./Configure -des -Dprefix=$HOME/
make
make test
make install
$HOME/bin/perl -v
export PATH=$HOME/bin/:$PATH

Installing Oracle Instant Client or Full Oracle Installation


1) Before proceeding with the oracle installation, please run the following commands to update
certain required packages on Red Hat 7.4. As root

yum update
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64
glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686
libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686
libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip
unzip

2) Download the oracle RPMs and copy it to the Linux machine.

3) Install the RPMs in the following order (as root):

rpm -ivh oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm


rpm -ivh oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.2-jdbc-12.2.0.1.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm

4) SET the LD_LIBRARY_PATH and ORACLE_HOME variables:

export LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib
export ORACLE_HOME=/usr/lib/oracle/12.2/client64

Installing DBD::Oracle Perl Module


1) Before proceeding with the installation of the module, make sure to install Perl-Devel module (as
root):

yum install perl-devel


yum install perl-DBI

2) Download the DBD::Oracle Perl Module and copy/upload it to the Linux machine

3) Untar/Unzip the module and navigate to the folder

tar xvzf DBD-Oracle-1.76.tar.gz

cd DBD-Oracle-1.76

4) Install the Perl Module

perl Makefile.PL
make && make install
Installing ora2pg
1) Download ora2pg and copy/upload it to the Linux machine

2) Untar/unzip the file

tar xjf ora2pg-19.1.tar.bz2

3) Navigate to the ora2pg folder

cd ora2pg-19.1/

4) Install ora2pg

perl Makefile.PL

make && make install

Testing ora2pg installation


Type ora2pg –version as following:

ora2pg --version
References
http://ora2pg.darold.net/documentation.html

https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

https://metacpan.org/pod/DBD::Oracle

You might also like