In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1 、 Requirement
[root@centos1] # perl-vThis 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. Install the Oracle client or server (here the oracle11g server has been installed)
Reference http://www.cnblogs.com/zydev/p/7213845.html
Configure the Oracle environment variable under the root user because you are going to execute ora2pg under 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. Install DBI,DBD::Oracle
DBI is only an abstraction layer. To support different databases, you need to write drivers for different databases under DBI. For MySql, there is DBD::Mysql, and for ORACLE, it is DBD::Oracle. DBD is the abbreviation of DataBase Driver. The installation sequence is to install DBI first, then DBD::Oracle
Media download path:
DBI: http://www.cpan.org/modules/by-module/DBI/
DBD: http://www.cpan.org/modules/by-module/DBD/
Install 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
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
Check the installation
[root@centos1 opt] # vi list.plains; 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. Install 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.80DBI-1.642Ora2Pg-20.0Perl-5.16.3
Environment variable
[root@centos1 opt] # export PERL5LIB=/usr/local/bin/ [root@centos1 opt] # source / etc/profile
Installation is complete, and then test the data migration from oracle to postgres to see the use of ora2pg (II. Configuration of ora2pg and data migration from oracle to postgres)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.