The easiest way to go about getting DBI installed on a *nix machine is to use Perl's CPAN interface. You will most likely need your sysadmin to do this. DBI by itself, however, does not know how to talk to any database. You need to install a database driver. Since you mentioned DB2, you will want
Bundle::DBD::DB2. This includes
Bundle::DBI which in turn includes
DBI,
DBI::Shell,
Storable,
Net::Daemon,
RPC::PlServer, and
DBD::Multiplex. If you have root on the box, try the following.
perl -MCPAN -e shell
This will ask you if you want to manually configure. I generally say 'No' on my dev boxes; Perl seems to select reasonable defaults and it all works. Once configuration is done, you should get a
cpan> prompt. Here you can just type:
install Bundle::DBD::DB2
This will download the latest sources; determine any pre-dependencies; download and install any missing pre-dependencies; then
make && make test && make install all of the packages mentioned above.
Note: DBD::DB2 will need to know the libraries and paths for DB2 in order to properly build and possibly even how to connect to a database to run make test.
Ivan Heffner
Sr. Software Engineer, DAS Lead
WhitePages.com, Inc.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.