The nightmare that is DBD::ORACLE on RHEL 5

Today I ran into a nagios machine that needed to check database stuff internally (connected users, corrupt blocks etc etc).. My perl scripts kept popping up errors about this oracle…. I have dealt with this in the past and I remember it being a nightmare…. I know there is some perl junky out there reading this saying ” Why didn’t you use cpan?”.. And in this case I would have rather have, but cpan was having issues with other perl modules and wasn’t worth my time… Any way here is how you can install DBD::ORACLE somewhat easily.

Firstly make sure you grab your dependencies..


# wget



# wget

Now you need to grab the oracle instant client basic and sql plus .. I can’t post a snippit because you need to use your user credentials to grab it but here are the links with the version and everything you will need:



Now that you have everything downloaded, go ahead and install them in the order you downloaded them in, using the “rpm -Uvh [filename].rpm” command. Once this is done we will need to set the LD_LIBRARY_PATH and the ORACLE_HOME paths in the environment (check this afterwards to make sure it took using the “env” command)..

# export ORACLE_HOME=/usr/lib/oracle/

# export LD_LIBRARY_PATH=/usr/lib/oracle/


And last but not least download the perl-dbd-oracle rpm and install it using theĀ  “rpm -Uvh [filename].rpm” command again…

# wget


And now you should be all set….





Leave a Reply

Your email address will not be published.