Mentat

Updated 2012: Mentat is no longer available for download. It's very old. Don't use it.

Mentat is a single-user web content management program intended for power-users. It is written entirely in strict Perl and uses very fast memory-cached SQLite for storage. It is distributed under a BSD License.

When Mentat was first hastily thrown together a decade ago, in 2001, I coded it to be simple, flexible and very easy to deploy. It started out as a CGI application and was later rewritten to use mod_perl. By today's standards, it is old-fashioned and lacks the advanced features of modern open-source content management systems. However, the strict, bloat-free 3000 line Perl codebase is well commented and remains easy to understand, extend and adapt by power-users.

Currently, Mentat is only suitable for the management of small to medium-sized websites by users at least somewhat competent in HTML.

As far as I know, Mentat only runs on Unix-based systems with Perl and Apache installed. The auto-generated web-server configuration assumes that you're using Apache with virtualhosts. The email notification mechanism requires an operational sendmail interface.

Unless you know what you're doing, you're probably better off with WordPress. That being said, you'll find the download link, installation instructions and other information on Mentat below.


Features and drawbacks

Features

Drawbacks


Install Perl modules

First, you'll need to make sure Perl and Apache are installed on your server machine. If you're running a modern UNIX operating system, this will almost certainly be the case. Then, open the CPAN shell to install module dependencies by running the following command:

sudo perl -MCPAN -e shell

Use the install command to install the following packages:

Time::HiRes
HTML::Entities
HTTP::Date
CGI
DBI
DBD::SQLite
Image::Info
Date::Manip

Download and deploy

Download Mentat 5.0

Once you've expanded the tgz archive, change to the directory created, mentat, and execute the following command, replacing name_of_website with the name of your website in lowercase, no spaces, and destination folder as the target folder on your file system that you wish to store the Mentat installation in.

sudo perl install_mentat.pl name_of_website destination_folder

The install script will create the necessary Mentat directory structure and apply the correct file permissions. The default webserver user is assumed to be www. If not, you can add your webserver username as the third argument. For example, if you're running the latest iteration of Mac OS X, the webserver user will be _www:

sudo perl install_mentat.pl name_of_website destination_folder _www

The install script will then run, install the Mentat instance and dump out a piece of text that looks something like this:

PerlSwitches -I/destination_folder/cgi-bin/

<VirtualHost *:80>
    ServerName name_of_website
    DocumentRoot /destination_folder/html/
    CustomLog /destination_folder/logs/name_of_website.log full
    ScriptAlias /cgi-bin/ /destination_folder/cgi-bin/

    <Files mentat.pl>
        PerlSetEnv BASEDIR /destination_folder
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        Options ExecCGI
        PerlSendHeader On
    </Files>

    RewriteEngine ON 
    RewriteRule ^/robots.txt /files/robots.txt [L,PT] 
    RewriteRule ^/favicon.ico /html/favicon.ico [L,PT]
    RewriteRule ^/icons/(.*)\$ /icons/\$1 [L,PT]
    RewriteRule ^/\$ /cgi-bin/mentat.pl?action=displaypage&name=index
    RewriteRule ^/images/(.*)\$ /images/\$1 [L,PT]
    RewriteRule ^/files/(.*)\$ /files/\$1 [L,PT]
    RewriteRule ^/cgi-bin/(.*)\$ /cgi-bin/\$1 [L,PT]
    RewriteRule ^/news/(.*)\$ /cgi-bin/mentat.pl?action=displaynews&newsitem=\$1 [L,PT]
    RewriteRule ^/(.*)\$ /cgi-bin/mentat.pl?action=displaypage&name=\$1 [L,PT]
</VirtualHost>

Update the ServerName directive to the DNS name you'll be using for the website. Then add the virtualhost configuration to your Apache httpd.conf file and restart the webserver:

sudo apachectl graceful

Your new Mentat deployment should now be accessible through the DNS name you assigned to it. Be sure to immediately assign a login password in the Configuration Panel under Admin.