14all Installation and basic configuration

This document describes the installation of the cgi script 14all.cgi.

14all.cgi displays web pages and graphics from rrdtool files. In most cases it will be used together with MRTG.


Script placement
Put the file 14all.cgi in a directory where the web server allows execution of cgi scripts. It has to be readable and executable by the user id the web server runs. If you use the 'sgid' or 'suid' installation method it might have to be world readable.

Script execution line
Check the first line of the cgi script: It has to contain the full path to the perl interpreter. It should look like this:

#!/usr/bin/perl -w


#!/usr/local/bin/perl -w

If you get an error message like

bash: 14all.cgi: command not found

the first line of the script might be wrong.

Library include path
Version 1.1 of the script needs the file MRTG_lib.pm which is part of mrtg-2.9. If you still have mrtg-2.8 (or older) please use 14all version 1.0.

If you get the error Can't locate MRTG_lib.pm in @INC you have to edit the script and change line 13 to contain the path to this file. E.g. if your mrtg is installed in /opt/mrtg29 the line should look like

   use lib qw(/opt/mrtg29);

Another line might be necessary for the rrdtool perl module RRDs.pm:

   use lib qw(/opt/rrdtool-1.0.33);

You need this if RRDs.pm wasn't installed with ``make site-perl-install'' when you installed rrdtool. If you get an error Can't locate RRDs.pm in @INC you need this line.

If you get the error Cannot find RRDs.so (or similar) the rrdtool perl module was only partially installed: It consists of two parts, the perl module RRDs.pm and the shared library RRDs.so. Please use the install methods provided by rrdtool to install it (make install or make site-perl-install).

Choosing the configuration file

Create a config file (see config.txt for syntax) and make sure the cgi can find it. There are several ways to tell the cgi which config file to use:

hard coded in the script
Write the config file name into the script. There is a section where the perl variable $cfgfile is set. Change the appropriate line. You can use a relative or absolute path. A relative path will be relative to the directory where the cgi is installed.

with a CGI parameter
The cgi accepts a parameter to select the config file. Create a web page which calls the cgi with the appended string


where ``file.cfg'' is your config file. This can be a relative or absolute path. A relative path will be relative to the directory where the cgi is installed or the directory given in the perl variable $cfgfiledir in the cgi script. You can change this variable in the script to put your config files in a different directory.

As the user can give any file through this CGI parameter I limited it and don't allow a '..' in it. If there are still any security reasons please contact me!

through the script's name
If no config filename is set in the script or given as parameter the script will build a file name from the script name by replacing the ending ``.cgi'' by ``.cgi''. I.e. if your config file is ``mrtg.cfg'' install the cgi as ``mrtg.cgi'' (or create a symbolic link) and the cgi will use your config file. Again the variable $cfgfiledir can be used to put the config files in a different directory.