perl访问Oracle的环境搭建
1、下载DBI和DBD
http://search.cpan.org/~timb/DBI-1.605/ DBI-1.605
在http://search.cpan.org/~pythian/DBD-Oracle-1.21/下载DBD-Oracle-1.21
2、查看perl是否安装
[oracle@olivenan ~]$ perl -v
This is perl, v5.8.5 built for i386-linux-thread-multi
Copyright 1987-2004, 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.
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.com/, the Perl Home Page.
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
[oracle@olivenan ~]
3、安装DBI,应该先安装DBI否则DBD无法安装成功
解压过程略
解压过程略
[root@olivenan DBI-1.605]# perl Makefile.PL
....
....
[root@olivenan DBI-1.605]# make
...
[root@olivenan DBI-1.605]# make install
[root@olivenan DBI-1.605]# make install
...
4、安装DBD-Oracle
[root@olivenan ~]# tar -zxvf DBD-Oracle-1.21.tar.gz
我在root下进行安装出现错误如下:提示未设置环境变量ORACLE_HOME
[root@olivenan DBD-Oracle-1.21]# perl Makefile.PL
Using DBI 1.605 (for perl 5.008005 on i386-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
Using DBI 1.605 (for perl 5.008005 on i386-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
Configuring DBD::Oracle for perl 5.008005 on linux (i386-linux-thread-multi)
Remember to actually *READ* the README file! Especially if you have any problems.
Trying to find an ORACLE_HOME
Your LD_LIBRARY_PATH env var is set to ''
Your LD_LIBRARY_PATH env var is set to ''
The ORACLE_HOME environment variable is not set and I couldn't guess it.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the appropriate README file for your OS for more information.
ABORTED!
[root@olivenan DBD-Oracle-1.21]# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the appropriate README file for your OS for more information.
ABORTED!
[root@olivenan DBD-Oracle-1.21]# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
[root@olivenan DBD-Oracle-1.21]# perl Makefile.PL
...
[root@olivenan DBD-Oracle-1.21]# make
...
[root@olivenan DBD-Oracle-1.21]# make
...
[root@olivenan DBD-Oracle-1.21]# make install
[root@olivenan DBD-Oracle-1.21]# make install
...
至此安装成功
0
最新评论共有 0 位网友发表了评论
查看所有评论
发表评论
