One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2007 May 01 - Tue

HTML Page Template Framework

'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

[/OpenSource/Debian/Monitoring] permanent link



Blog Content ©2008
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 505 7293
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



May
Su Mo Tu We Th Fr Sa
    1
   


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge

2007
Months
May




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.