Howto install mod_perl2 and HTML::Mason on Debian-etch

chrisv on 2007-10-08T00:17:36

I ordered myself some webservers at iWeb.ca recently with Debian (etch) preconfigured on them.

Apache2 (2.2.3) was already installed on them; this is how I added mod_perl2 and HTML::Mason:

#uname --all Linux cl-t088-250cl 2.6.18-5-686 #1 SMP Sun Aug 12 21:57:02 UTC 2007 i686 GNU/Linux

#apt-get install apache2-dev ... #apt-get install libapreq2 ... #apt-get install libapache2-mod-perl2 ... #apt-get install libhtml-mason-perl ... #mkdir /etc/apache2/mason #mkdir /etc/apache2/obj #mkdir /etc/apache2/cache #chown -R www-data /etc/apache2/mason

#vim /etc/apache2/mods-available/perl.load LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so

#ln -s /etc/apache2/mods-available/perl.load /etc/apache2/mods-enabled/perl.load

then update the /etc/apache2/sites-available with HTML::Mason configs (see masonhq.com)


Some minor points

grantm on 2007-10-08T06:52:56

You could install multiple packages with one command

apt-get install apache2-dev libapreq2 libapache2-mod-perl2 libhtml-mason-perl

You put your Mason cache under /etc, but a more conventional place would be under/var/cache. In fact I'm pretty sure the libhtml-mason-perl package actually creates /var/cache/mason and sets the permissions appropriately.

Rather than manually adding a LoadModule config line you can use the a2enmod command to enable a module:

a2enmod perl

Re:Some minor points

chrisv on 2007-10-08T09:16:36

You are absolutely right. Thank you for the info/corrections.