'Glue' web pages on the monitoring server are generated through the Mason Delivery Engine. In other words, Mason is a Perl based template system used for formatting the primary web pages of this server. It requres the use of Apache and mod_perl. Here is what I do to install Mason for my needs. As the monitoring server relies on NetDisco tables, a portion of the installation process revolves around initializing the NetDisco PostgreSQL database.
Installation
Install the packages:
apt-get install libhtml-mason-perl
apt-get install libdbi-perl
apt-get install libdbd-pg-perl
apt-get install apache2-dev
apt-get install libapache2-mod-apreq2
apt-get install libapache-dbi-perl
apt-get install libmasonx-request-withapachesession-perl
apt-get install libapache2-request-perl
ln -s /etc/apache2/mods-available/apreq.load
/etc/apache2/mods-enabled/apreq.load
Add the following line into '/etc/postgresql/7.4/main/pg_hba.conf':
local netdisco netdisco trust
Create and load database:
/etc/init.d/postgresql-7.4 restart
su - postgres
psql template1
create user netdisco;
create group netdisco user netdisco;
create database netdisco with owner netdisco;
\q
psql netdisco -U netdisco < netdisco.dump
exit
Add the following lines into /etc/apache2/sites-available/default:
PerlModule HTML::Mason::ApacheHandler
<LocationMatch "(.html|.txt|.pl)$">
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</LocationMatch>
<LocationMatch "(.m(html|txt|pl)|dhandler|autohandler)$">
SetHandler perl-script
PerlInitHandler Apache::Constants::NOT_FOUND
</LocationMatch>
<Directory />
Options FollowSymLinks
AllowOverride None
AllowOverride AuthConfig
AuthType Basic
AuthName "Password Required"
AuthUserFile /etc/apache2/sites-available/password.file
Require user admin
</Directory>
Create a password file with a username admin:
htpasswd -c /etc/apache2/sites-available/password.file admin
Restart Apache:
/etc/init.d/apache2 restart