热门关键字:  ubuntu  分区  函数  Fedora  linux系统进程

当前位置 :| 主页>Linux教程>编程开发>Perl>

perl访问Oracle的环境搭建

来源: 作者: 时间:2008-07-09 Tag: 点击:
perl访问Oracle的环境搭建
 
1、下载DBI和DBD
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.
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.
[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
...
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/
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 ''
      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
[root@olivenan DBD-Oracle-1.21]# perl Makefile.PL
...
[root@olivenan DBD-Oracle-1.21]# make
...
[root@olivenan DBD-Oracle-1.21]# make install
...
至此安装成功
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册