Unbenannt.gif (2298 Byte)


Installation of mc2

This file how to install mc2. Please read it before installing mc2, you may find some valuable informatin in it.

It is divided in an overview part, a Listing of all classes, a brief description for every class and a section about the cgi scripts wirtten in perl.

Where to put which files

Configuration

Security Considerations

 

Where to put which files 1. Class files

The following java class files should be in the same directory as the index.html file is. Its permissions should be set so that the web server has access to them. Maybe you'd like to set their ownership to something like chmod httpd:httpd *.class.

AWTHelper.class
Cfg.class
CheckPort$MyCheckHandler.class
CheckPort$MyDeleteHandler.class
CheckPort$MyEditHandler.class
CheckPort$MyListSelectHandler.class
CheckPort$MyWindowHandler.class
CheckPort.class
ChooseDialog$FLList.class
ChooseDialog$IL.class
ChooseDialog.class
Distiller.class
EditTarget$CloseHandler.class
EditTarget$DialogCancel.class
EditTarget$DialogNo.class
EditTarget$DialogWindow.class
EditTarget$DialogYes.class
EditTarget$LeftHandler.class
EditTarget$RevertHandler.class
EditTarget$RightHandler.class
EditTarget$SaveHandler.class
EditTarget$WindowHandler.class
EditTarget$showInfo.class
EditTarget.class
InputChannel.class
LineDialog.class
MC2$Add1.class
MC2$CheckHandler.class
MC2$ChooseCancel.class
MC2$ChooseWindow.class
MC2$CloseNo.class
MC2$CloseYes.class
MC2$CopyHandler.class
MC2$CreateHandler.class
MC2$DeleteHandler.class
MC2$DeleteYes.class
MC2$EditHandler.class
MC2$GetHandler.class
MC2$ListSelectHandler.class
MC2$Open1.class
MC2$Save1.class
MC2$SaveHandler.class
MC2$WindowHandler.class
MC2$YesNoCancel.class
MC2$YesNoWindow.class
MC2$check.class
MC2$showInfo.class
MC2.class
MC2Applet.class
MultiLineLabel.class
OpenDialog.class
OutputChannel.class
SaveDialog.class
Target.class
WarnDialog.class
YesNoDialog.class

If you like to have the class files in a directory other than the index.html file's, make sure to change the CODEBASE line in the APPLET tag to the corresponding path.

2. CGI
The 3 cgi scripts named cfgreader.pl, cfgwriter.pl and dirreader.pl, should be placed in a cgi directory of your webserver. They need at least perl 5.003 to work correctly -- but this shoulndn't be a problem, because mrtg needs it as well.
Make the scripts executable and fill in the path to them in the corresponding PARAM tag (see below).

 

Configuration The PARAM tags

There is no config file for MC2. All what it needs to know is given by the PARAM tag inside the APPLET tag in the index.html file. MC2's APPLET tag looks like that (I'll explain this below):

<APPLET CODE = "MC2Applet.class" WIDTH = 10 HEIGHT = 10 >
<PARAM name = "WorkDir" value = "/htdocs/mrtg/">
<PARAM name = "IconDir" value = "/mrtg/">
<PARAM name = "DirectoryReader" value = "http://su0330/cgi-bin/Test/dirreader.pl">
<PARAM name = "cfgReader" value = "http://su0330/cgi-bin/Test/cfgreader.pl">
<PARAM name = "cfgWriter" value = "http://su0330/cgi-bin/Test/cfgwriter.pl">
<PARAM name = "cfgBase" value = "/opt/mrtg/">
<PARAM name = "BackupURL" value = "/opt/mrtg/backup/">
</APPLET> (This is the Applet =)



<APPLET CODE = "MC2Applet.class" WIDTH = 10 HEIGHT = 10 >

The code base, labeled CODE, is the path to the Applet class file relative from the index.html file. All class files must be in the same directory, and if the index.html is not in the same, make here the correct changes. The WIDTH and HEIGHT attributes can be any values you like, because they're not important: The applet opens its own window. However, if you'd like to see the Smiley, set it to something similar as above.


<PARAM name = "WorkDir" value = "/htdocs/mrtg/">

The WorkDir parameter is the path (relative to the root directory on the server), where mrtg should put the html and gif files.

<PARAM name = "IconDir" value = "/mrtg/">

The IconDir is the location where the icons for mrtg are stored, relative to the html root.


<PARAM name = "DirectoryReader" value = "http://su0330/cgi-bin/Test/dirreader.pl">

This is the complete URL to the dirreader.pl cgi.


<PARAM name = "cfgReader" value = "http://su0330/cgi-bin/Test/cfgreader.pl">

The complete URL to the cfgreader.pl cgi.


<PARAM name = "cfgWriter" value = "http://su0330/cgi-bin/Test/cfgwriter.pl">

The complete URL to the cfgwriter.pl cgi.


<PARAM name = "cfgBase" value = "/opt/mrtg/">

This is the path (relative to root) where the Cfg files should be stored. This is the directory that MC2 opens first in the Open and Save dialogs.


<PARAM name = "BackupURL" value = "/opt/mrtg/backup/">

This is the place where MC2 should put backup files of the files overwritten while saving.

 

Security Considerations MC2 has some cgi scripts which can cause harm if not installed correctly. Once again, you should not grant access to those scripts to unknown people.

See the security page for more details.

Last updated: 07/16/98, by ibgm.