Perl Modules on FreeBSD 6.2

Prerequisites:

FreeBSD (Base + Autoconf, Automake, Bash and GCC)
MySQL (If you install DBD::mysql)

Overview:
 Optional - Setup "Direct connection to CPAN" using CPAN Shell
 Step #1   - Install DBI
 Step #2   - Install DBD::mysql
 Step #3
   - Install SNMP_Session
 Step #4
   - Install Net::SNMP
 Step #5
   - Install CGI.pm
 Step #6   - Install SNMP::Info
 Step #7   - Install HTML::HeadParser
 Step #8   - Install URI.pm
 Step #9   - Install libwww
 Step #10 - Install BSD::Resource

Optional

Setup "Direct connection to CPAN" using CPAN Shell

Home: 

 http://www.cpan.org

# Note: If you are behind a proxy server read this

# Prerequisite: Perl CPAN Shell
 


#
 Launch the CPAN shell anytime
/usr/bin/perl -MCPAN -e shell

#
 Install DBI (via CPAN Shell now or at Step #1 coming up in the very next section)
install DBI



#
 CPAN shell commands to know - just FYI
?           <-- Display Help Menu
reload cpan <-- Reloads CPAN interface
i /DBD/     <-- Searches for any module with "DBD" in the name
install DBI <-- Installs module "DBI"

 

Step #1 - You can safely skip this DBI step if you installed DBI via the CPAN shell above

Install DBI

Home:

 http://dbi.perl.org

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.52.tar.gz

# Unzip and Untar
tar xvf DBI-1.52.tar.gz


# Configure
cd DBI-1.52
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #2 - Install DBD::mysql from source as shown below, not from the CPAN shell

Install DBD::mysql

Home:

 http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm

#NOTE: This module requires that you have already installed MySQL Server into /opt/mysql

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-3.0007_1.tar.gz

# Unzip and Untar
tar xvf DBD-mysql-3.0007_1.tar.gz

# Configure
cd DBD-mysql-3.0007_1
perl Makefile.PL --mysql_config=/opt/mysql/bin/mysql_config --ssl

#
 Compile
make

#
 Install
make install

 


Step #3

SNMP_Session

Home:

 http://www.switch.ch/misc/leinen/snmp/perl/

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://www.switch.ch/misc/leinen/snmp/perl/dist/SNMP_Session-1.08.tar.gz

# Unzip and Untar
tar xvf SNMP_Session-1.08.tar.gz


# Configure
cd SNMP_Session-1.08
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #4

Net::SNMP

Home:

 http://search.cpan.org/~dtown/Net-SNMP/lib/Net/SNMP.pm

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/D/DT/DTOWN/Net-SNMP-5.2.0.tar.gz

# Unzip and Untar
tar xvf
Net-SNMP-5.2.0.tar.gz

# Configure
cd Net-SNMP-5.2.0
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #5

CGI.pm

Home:

 http://search.cpan.org/~lds/CGI.pm/CGI.pm

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/L/LD/LDS/CGI.pm-3.20.tar.gz

# Unzip and Untar

tar xvf CGI.pm-3.20.tar.gz


# Configure
cd CGI.pm-3.20
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #6

SNMP::Info

Home:

 http://snmp-info.sourceforge.net

# Change to your desired "source" storage directory
cd /usr/src


# Download

fetch http://easynews.dl.sourceforge.net/sourceforge/snmp-info/SNMP-Info-1.04.tar.gz

# Unzip and Untar
tar xvf SNMP-Info-1.04.tar.gz


# Configure
cd SNMP-Info-1.04
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #7

HTML::HeadParser

Home:

 http://search.cpan.org/dist/HTML-Parser/lib/HTML/HeadParser.pm

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/HTML-Parser-3.55.tar.gz

# Unzip and Untar
tar xvf HTML-Parser-3.55.tar.gz


# Configure
cd HTML-Parser-3.55
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #8

URI.pm

Home:

 http://search.cpan.org/~gaas/URI-1.35/URI.pm

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/URI-1.35.tar.gz

# Unzip and Untar

tar xvf URI-1.35.tar.gz


# Configure
cd URI-1.35
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #9

libwww-perl

Home:

http://search.cpan.org/dist/libwww-perl/

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.805.tar.gz

# Unzip and Untar
tar xvf libwww-perl-5.805.tar.gz


# Configure
cd libwww-perl-5.805
perl Makefile.PL

#
 Compile
make

#
 Install
make install


Step #10

BSD::Resource

Home:

 http://search.cpan.org/~jhi/BSD-Resource/Resource.pm

# Change to your desired "source" storage directory
cd /usr/src

# Download

fetch http://search.cpan.org/CPAN/authors/id/J/JH/JHI/BSD-Resource-1.28.tar.gz


# Unzip and Untar

tar xvf BSD-Resource-1.28.tar.gz


# Configure
cd BSD-Resource-1.28
perl Makefile.PL

#
 Compile
make

#
 Install
make install