The following commands are based on the assumption that
htdocs directory is /var/www and cgi-bin directory is /usr/lib/cgi-bin
if [ ! -d /srv ] ; then mkdir /srv ; fi
if [ ! -d /srv/www ; then mkdir /srv/www ; fi
ln -s /var/www /srv/www/htdocs
ln -s /usr/lib/cgi-bin /srv/www/cgi-bin
Now we can go on.
# create user cisco with home directory /home/cisco before doing thisyyyy-mm-dd-vvv means yyyy (year), mm (month), dd (day), vvv (version)
cd / ; tar xfvz CiscoTools-yyyy-mm-dd-vvv.tgz
# correct owner and permission on files
chown -R cisco /home/cisco
chmod 700 /home/cisco
chown -R cisco /srv/www/htdocs/cisco
chown -R cisco /srv/www/cgi-bin/cisco
apache may need some configuration, too.
If cgi-bin scripts don't work right away insert the following lines:
/etc/httpd/conf/httpd.conf (hopefully)If you change apache configuration files please restart apache to let those changes take effect. Depending on your operating system and distributor this may look something like this:
<Directory "/srv/www/cgi-bin/cisco">
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>
/etc/init.d/apache2 restart
For this example we assume location HQ to be the first location.
# make working copies of configuration files
cd /home/cisco/access cp cisco-routers-LOCATION cisco-routers-HQ
chmod 600 cisco-routers-HQ
cp cisco-switches-LOCATION cisco-switches-HQ
chmod 600 cisco-switches-HQ
# edit list of routers
vi cisco-routers-HQ
# edit list of switches
vi cisco-switches-HQ
# this is mandatory - create location for cgi scripts
cd /srv/www/cgi-bin/cisco
mkdir HQ
chmod 755 HQ
cp portmaps-EXAMPLE.txt HQ/portmaps.txt
chmod 644 HQ/portmaps.txt
# document all switch interconnections
vi HQ/portmaps.txt
# this is optional
cp ignorearp-EXAMPLE.txt HQ/ignorearp.txt
chmod 644 HQ/ignorearp.txt
vi HQ/ignorearp.txt
# this is optional
cp ignoremac-EXAMPLE.txt HQ/ignoremac.txt
chmod 644 HQ/ignoremac.txt
vi HQ/ignoremac.txt
# this is optional
cp ipblocks-EXAMPLE.txt HQ/ipblocks.txt
chmod 644 HQ/ipblocks.txt
vi HQ/ipblocks.txt
If the apache root directory is not "/srv/www" and you don't want to use symbolic links as described above you may modify the following configuration files/scripts:
/home/cisco/bin/commonDocument those changes for they have to be reapplied after each CiscoTools update. This is not recommended.
/srv/www/cgi-bin/cisco/CiscoTools.pl
crontab entries for user "cisco" should look like this:
*/5 * * * * /home/cisco/bin/arplog-all HQ >/dev/null 2>/dev/nullYou may use crontab -e to edit your crontab entries.
*/5 * * * * /home/cisco/bin/maclog-all HQ >/dev/null 2>/dev/null