Mel Awaisi wrote:

> Hi
> 
> i am using Red Hat Linux 8 as a server for a project i am working on.
> i have installed MySQL automatically with the install of the OS. and then
> i installed  Apache Server.
> 
> i would like to install DBI in order for me to be able to use a script
> that i have in perl to insert data into MySQL databse.
> 
> What is the easiest and most understandable way to install it?
> 
> Regards,
> 
> Mel


Two ways. Start with the DBI provided by Red Hat.

(rpm -qa |grep perl)

You will need the following:

perl-5.8.0-55
perl-DBD-MySQL-2.1017-3
perl-DBI-1.30-1

You could also add:

perl-DB_File-1.804-55

...if you were interested in working with DB_File type databases as well.

I'd also recommend installing:

perl-CPAN-1.61-55

...as then you can upgrade the installed modules to more recent counterparts

install all of the above with the following

(up2date -i perl-DBD-MySQL perl-DBI perl-DB_File perl-CPAN)

{
        Additionally I'd recommend making sure you have all the mysql stuff
        installed.. 

        (rpm -qa |grep -i mysql) should yield at least the following: 
        mysql-3.23.54a-4
        mysql-devel-3.23.54a-4
        mysql-server-3.23.54a-4
}

With CPAN installed, then you can do simple things like

#> perl -MCPAN -e shell
cpan> m DBI
{results}
cpan> install DBI
{many results} 
cpan> m DBD::mysql
{results}
cpan> install DBD::mysql
{many results} 
cpan> 

etc

I've written a very nice module-reporting script that helps me to stay on 
top of installed modules and easily see when they require updates from CPAN 
for bugfixes. 

http://www.webdragon.net/mr/

perldoc CPAN for more info on the CPAN shell. 

Reply via email to