v1.0                 How to Install routers.cgi script
                     ---------------------------------

Before Starting
---------------
First, you need to make sure you have the following installed:
	RRDTool
	MRTG
	Perl (V5 or better)
	Perl CGI libraries
	A web server (duh).  If using Apache, you need mod_expires

You probably have these, if you have already installed MRTG and RRDTool.

Next, you need to make sure of the following:

* All MRTG .conf files to be handled by routers.cgi have the 'UseRRDTool'
  option set, and their databases are in RRDTool format.
* Each MRTG .conf file deals with a different router.
* The 'short' name for the router is the first word in the first 'Title' line in
  each MRTG .conf file.

The last two will be correct if you created your .conf files using the
cfg-maker --vendor command.

Use of routers.cgi under Windows NT
-----------------------------------
I have not tried this, but it /should/ work.  However, there are a few
caveats.  The script relies on the .htaccess file to force the expiry of
old graphs.  If you are using Apache under NT this may still be OK, but IIS
does not use the htaccess file.  You need to ensure that the graphs directory
is either set for the appropriate expiry times, or set to NEVER CACHE.  If
anyone can provide instructions on how to do this I will include them here.

All these instructions are UNIX-centric.  Windows NT people should make the
appropriate changes for directory paths, permissions, and so on.  You will
obviously need the Windows version of Perl installed and made CGI-able.

Creating Directories
--------------------
Now you need to decide where to put the files.  The directories you will
need are as follows:

CGI-BIN DIRECTORY: This is where the routers.cgi file goes, with read and
  execute permission.  This directory should be visible to your web browser
  with exec-cgi flag set.

ICONS DIRECTORY: This is where all the .gif files are put.  This directory
  should be visible to your web browser.  Make a note of the directory's URL

GRAPHS DIRECTORY:  This is the work directory for the graphs.  It needs to 
  be writeable to the httpd UID, and otherwise empty.  The htaccess file should
  be placed in here.  This directory also needs to be visible to your web
  browser.  Make a note of the URL of the directory, and its path in the 
  filesystem.  Note that under some web servers you do not have the htaccess
  file - you should do whatever is equivalent on your server.  Also, Apache
  needs to have the mod_expires module installed to use htaccess.

DATABASE DIRECTORY: Where the RRDTool .rrd databases are kept.  This should
  already exist.

MRTG CONF DIRECTORY:  Where the MRTG .conf files are kept.  This should
  already exist.

Configuring the perl script
---------------------------
This is now done via a separate configuration file.  You should modify the 
script so that it knows where the conf file is (the line is clearly marked
at the beginning of the .pl file)

The conf file should have at least 2 section, [web] and [routers.cgi].  The
first needs an entry 'backurl' to define where the 'Main Menu' button takes us.
The other section defines all the other options that used to be hardcoded into
the script.

A third section, [routerdesc] is optional and allows you to override the 
default short description for the routers.

The short description for a router is taken as:
	: The entry in the routerdesc hash, or
	: The 'ShortDesc[_]: ....' entry in the mrtg.conf files, or
	: The first word in the 'Title[..]: ...' line in the mrtg.conf files
      (this is also the key used to uniquely identify the router)

See the example routers.conf file for more information.

Installing the files
--------------------
Copy the routers.cgi file to the CGI-BIN directory, permission 555.
If it is called routers.cgi.pl in the package then rename it to routers.cgi

Copy the htaccess file to the GRAPHS directory as .htaccess, permission 444.
This is not necessary is your web server does not use htaccess files - you 
should do the equivalent for your server.  Apache may need mod_expires 
activated for htaccess to work.

Copy the *.gif files to the ICONS directory.

Testing the script
------------------
It should now work!  Point your browser at the routers.cgi file, and see
what you get.  Note that you MUST have javascript enabled on your browser
for the pages to function correctly, and you need cookies enabled if you
want to use the personal preferences page.

-Steve
