|
Prerequisites: |
FreeBSD (Base + Autoconf, Automake,
Bash and GCC) MySQL (If you install DBD::mysql) |
|
Overview: |
|
Setup "Direct connection to CPAN" using CPAN Shell
Home:
# 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 HTTP::Date
install HTTP::Date
# Install DBI
(via CPAN Shell now or at Step #1 coming up in the very next
section)
install DBI
# After installation, exit CPAN shell
exit
# 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"
|
Install DBI |
|
|
Home: |
http://dbi.perl.org |
|
# Change to your desired "source" storage
directory
# Unzip and Untar |
|
Step #2 -
Install DBD::mysql from source as shown below, not from the CPAN shell
Install DBD::mysql
Home:
#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-4.008.tar.gz
# Unzip and Untar
tar xvf
DBD-mysql-?.???.tar.gz
# Configure
cd DBD-mysql-?.???
perl Makefile.PL --mysql_config=/usr/local/bin/mysql_config --ssl
# Compile
make
# Install
make install
|
SNMP_Session |
|
|
Home: |
http://www.switch.ch/misc/leinen/snmp/perl/ |
|
# Change to your desired "source" storage
directory
# Unzip and Untar |
|
|
Net::SNMP |
|
|
Home: |
http://search.cpan.org/~dtown/Net-SNMP/lib/Net/SNMP.pm |
|
# Change to your desired "source" storage
directory
# Unzip and Untar |
|
|
CGI.pm |
|
|
Home: |
http://search.cpan.org/~lds/CGI.pm/CGI.pm |
# Launch the CPAN shell anytime
# After installation, exit CPAN shell
# Change to your desired "source" storage
directory |
|
|
SNMP::Info |
|
|
Home: |
http://snmp-info.sourceforge.net |
|
# Change to your desired "source" storage
directory
# Unzip and Untar |
|
|
HTML::HeadParser |
|
|
Home: |
http://search.cpan.org/dist/HTML-Parser/lib/HTML/HeadParser.pm |
|
# Change to your desired "source" storage
directory
# Unzip and Untar |
|
|
URI.pm |
|
|
Home: |
http://search.cpan.org/~gaas/URI/URI.pm |
|
# Change to your desired "source" storage
directory |
|
|
libwww-perl |
|
|
Home: |
http://search.cpan.org/dist/libwww-perl/ |
|
# Change to your desired "source" storage
directory
# Unzip and Untar |
|
|
BSD::Resource |
|
|
Home: |
http://search.cpan.org/~jhi/BSD-Resource/Resource.pm |
|
# Change to your desired "source" storage
directory |
|
|
Additional PERL Modules via CPAN Shell |
|
|
Note: |
Over time I find modules that are useful and that I include by default now to avoid pain later! |
|
# Launch the CPAN shell and add more modules! |
|
|
require "cgi-lib.pl"; |
|
|
Home: |
http://cgi-lib.berkeley.edu |
|
# Change to the FreeBSD Ports directory for
cgi-lib.pl
# Below is an example CGI
that uses PERL that you can use later after you have Apache
installed
# Example web page simple.html
(that calls simple.pl)
# Example PERL CGI Script
simple.pl
# File Permissions
# Edit Apache config to allow cgi and pl files to execute by
editing, un-commenting and adding 3 things
# Restart Apache
# Test out the script
# Clean up |
|