INSTALL(1) 14all INSTALL(1) 1144aallll IInnssttaallllaattiioonn aanndd bbaassiicc ccoonnffiigguurraattiioonn 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. IInnssttaallllaattiioonn 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 con­ tain 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 bbaasshh:: 1144aallll..ccggii:: ccoommmmaanndd nnoott ffoouunndd 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 simi­ lar) 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). CChhoooossiinngg tthhee ccoonnffiigguurraattiioonn ffiillee 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 _$_c_f_g_f_i_l_e 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 directory where the cgi is installed or the directory given in the perl variable $$ccffgg­­ ffiilleeddiirr in the cgi script. You can change this vari­ able in the script to put your config files in a dif­ ferent directory. As the user can give any file through this CGI parame­ ter 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 $$ccffgg­­ ffiilleeddiirr can be used to put the config files in a dif­ ferent directory. 14all 1.0p13 2002-06-09 INSTALL(1)