NAME

Apache::SdnFw - Framework to build systems using perl, template toolkit and postgresql.

SYNOPSIS

This is not a typical perl module that can be used in shell scripts, (though it can be used in shell scripts). It is designed to be used in conjunction with apache via mod_perl so just doing a typical use Apache::SdnFw is not going to work.

INSTALL

Before you Installing CPAN module you first need to install postgresql and apache. Below are how I compile apache and postgresql and get them configured.

postgresql

cd /root/src
wget http://wwwmaster.postgresql.org/redir/198/h/source/v8.2.20/postgresql-8.2.20.tar.gz
tar -zxf postgresql-8.2.20.tar.gz
cd postgresql-8.2.20
./configure
make
make install
useradd postgres
mkdir /usr/local/pgsql/data
chown postgres /home/postgres
chown postgres /usr/local/pgsql/data
cd /root/src/postgresql-8.2.20/contrib/start-scripts/
cp linux /etc/rc.d/init.d/postgresql
# EDIT /etc/rc.d/init.d/postgresql and make it start at 80 instead of 98
# because it needs to start before apache
chkconfig --add postgresql
chmod +x /etc/rc.d/init.d/postgresql
su - postgres
cd /usr/local/pgsql/bin/
./initdb /usr/local/pgsql/data
exit
service postgresql start
# make life easy so we don't need to muss with paths
rm -f /usr/bin/psql
ln -s /usr/local/pgsql/bin/psql /usr/bin
rm -f /usr/bin/createdb
ln -s /usr/local/pgsql/bin/createdb /usr/bin
rm -f /usr/bin/dropdb
ln -s /usr/local/pgsql/bin/dropdb /usr/bin
rm -f /usr/bin/pg_dump
ln -s /usr/local/pgsql/bin/pg_dump /usr/bin

apache

mkdir -p /root/src/apache
cd /root/src/apache
wget http://www.apache.org/dist/perl/mod_perl-1.30.tar.gz
wget http://archive.apache.org/dist/httpd/apache_1.3.37.tar.gz
wget http://www.modssl.org/source/mod_ssl-2.8.28-1.3.37.tar.gz
tar -zxf mod_perl-1.30.tar.gz
tar -zxf apache_1.3.37.tar.gz
tar -zxf mod_ssl-2.8.28-1.3.37.tar.gz
cd mod_perl-1.30
perl Makefile.PL APACHE_SRC=../apache_1.3.37/src DO_HTTPD=1 \
USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1
make
make install
cd ../mod_ssl-2.8.28-1.3.37/
./configure --with-apache=../apache_1.3.37 --with-ssl=SYSTEM \
--prefix=/usr/local/apache --enable-shared=ssl
cd ../apache_1.3.37
wget http://www.awe.com/mark/dev/mod_status_xml/dist/mod_status_xml.c
mv mod_status_xml.c src/modules/extra/
./configure --activate-module=src/modules/perl/libperl.a --enable-module=env \
--enable-module=log_config --enable-module=log_agent --enable-module=log_referer \
--enable-module=mime --enable-module=status --enable-module=info --enable-module=dir \
--enable-module=cgi --enable-module=alias --enable-module=proxy --enable-module=rewrite \
--enable-module=access --enable-module=expires --enable-module=setenvif --enable-module=so \
--activate-module=src/modules/ssl/libssl.a --enable-module=dir --disable-shared=dir \
--add-module=src/modules/extra/mod_status_xml.c
make
make install

AUTHOR

Chris Sutton, <chris@smalldognet.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Chris Sutton

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.