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.


Installation

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

or

#!/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.


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

?cfg=file.cfg

where ``file.cfg'' is your config file. This can be a relative or absolute path. A relative path will be relative to the irectory 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.

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.