DBD-Oracle and Oracle Instant Client recipe
From: Tim Barrass (tim.barrass_at_physics.org)
Date: 02/17/05
- Next message: Tim Barrass: "Re: DBD-Oracle and Oracle Instant Client recipe"
- Previous message: Mladen Gogala: "Re: DBI error checking not working"
- Next in thread: Tim Barrass: "Re: DBD-Oracle and Oracle Instant Client recipe"
- Reply: Tim Barrass: "Re: DBD-Oracle and Oracle Instant Client recipe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: dbi-users@perl.org Date: Thu, 17 Feb 2005 14:52:03 +0000
Not sure if this has been solved already, but here's how I built
DBD-Oracle against the Oracle Instant Client ..
Build DBD against Oracle Instant Client SDK
Building on ScientificLinux3, perl 5.8.0 (basically RHE3).
Need OIC version 10.1.0.3. Download the basic, sqlplus and devel zips.
You need to rejiggle the files (not many) to form a reasonable
directory structure. Assume $BASE holds your top level directory for
installation, then:
mkdir $BASE
cd $BASE
# download instantclient-basic-linux32-10.1.0.3.zip
# download instantclient-sqlplus-linux32-10.1.0.3.zip
# download instantclient-sdk-linux32-10.1.0.3.zip
unzip *.zip # creates dir instantclient10_1
export ORACLE_HOME=${BASE}/instantclient10_1
cd $ORACLE_HOME
ln -s libclntsh.so.10.1 libclntsh.so
mkdir lib
mkdir bin
mkdir java
mv lib* lib
mv sqlplus bin
mv glogin.sql bin
mv *jar java
mv sdk/demo .
mv sdk/include .
rm -fr sdk
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export SQLPATH=$ORACLE_HOME/bin
cd ..
mkdir perl-modules
cd perl-modules
wget
http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.16.tar.gz
tar zxvf DBD-Oracle-1.16.tar.gz
# Need to edit the Makefile.PL- here's my diff
diff Makefile.PL.orig Makefile.PL
1122a1123,1126
> # Tim Barrass: hacked for Oracle Instant Client
> if ( $OH =~ /instantclient/ ) {
> $linkvia = "$ENV{ORACLE_HOME}/lib/libclntsh.so";
> }
1254a1259
> "$OH/include", # Tim Barrass, hacked for OIC install from zips
perl Makefile.PL prefix=$BASE/perl-modules -m $ORACLE_HOME/demo/demo.mk
# If you see WARNING: I could not determine Oracle client version ...
# remove the trailing slash from ORACLE_HOME
make
make install
# Create and environment script
export BASE=<your base dir>
export ORACLE_HOME=${BASE}/instantclient10_1
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
export PATH=${ORACLE_HOME}/bin:${PATH}
export SQLPATH=${ORACLE_HOME}/bin
# Note the trailing end of perl5lib might vary with architecture-
# look out for where your DBD-Oracle actually gets installed
export
PERL5LIB=${ORACLE_HOME}/perl-modules/lib/perl5/site_perl/5.8.0/i386-
linux-thread-multi
export TNS_ADMIN=<path to your tnsnames.ora file>
# test at will ...
Cheers,
Tim
- Next message: Tim Barrass: "Re: DBD-Oracle and Oracle Instant Client recipe"
- Previous message: Mladen Gogala: "Re: DBI error checking not working"
- Next in thread: Tim Barrass: "Re: DBD-Oracle and Oracle Instant Client recipe"
- Reply: Tim Barrass: "Re: DBD-Oracle and Oracle Instant Client recipe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|