next up previous 62
Next: Using the commands
Up: Installation and setup
Previous: Installing the package

Installing the CGI script

This part of the installation can normally only be done by the system manager.

In order to use this package to browse source code using a World Wide Web browser, the browser script must be installed as a CGI (Common Gateway Interface) program on a computer running an HTTP server. For this purpose, the browser script is copied by the package installation process (the mk install step) into INSTALL/bin/cgi as well as into INSTALL/bin.

A full discussion of the setup of CGI programs is beyond the scope of this document, but by way of example, if the HTTP server being used is Apache, it will typically be necessary to add a stanza like the following to Apache's conf/access.conf file:

<Directory /star/bin/cgi>
Options ExecCGI
and a line like the following to the conf/srm.conf file:
ScriptAlias /cgi-bin/star/ /star/bin/cgi/
Alternatively, the script INSTALL/bin/cgi/ may be copied into an existing CGI directory; if correctly installed it should still work if its name or location are changed.

Every attempt has been made to make the CGI script secure against abuse by users of the browsing facility, but provision of any CGI program is an inherently risky business. It should also be noted that the browser program can use significant system resources which might make it possible for users of the service intentionally or unintentionally to degrade performance of the server. In particular, heavy use may be made of the following resources:

CPU time
Parsing source files to add the HTML tags is done on the fly by the browser program. On the whole this is pretty fast - few will take more than a couple of seconds to serve, but very large source files, or very many concurrent requests, might put a significant load on the system.
Again memory use should be fairly modest, but if the browser gets into trouble tagging a large source file it might briefly take a big chunk of memory.
Temporary disk space
Temporary files will created in the SCB_BROWSER_TMP directory if it is necessary to unpack tar archives. The problem is most acute when tar files are contained in other tar files (usually only the case if the whole source archive for each package is stored as a tar file, rather than unpacked as is more usual). You may wish to unpack all the tar files within the source archive in place, for instance using a C-shell sequence like
setenv SCB_SOURCES /star/sources
foreach tarfile (`find $SCB_SOURCES -name \*.tar -print`)
   cd $tarfile:h
   tar xf $tarfile:t
In this case no temporary disk space will be used, and much reduced disk activity will be required by the browser program. The disadvantage of doing this is increased use of disk space in the SCB_SOURCES directory (by around 250MB for the full unbuilt source code collection).

next up previous 62
Next: Using the commands
Up: Installation and setup
Previous: Installing the package

SCB --- Source Code Browser
Starlink User Note 225
M. B. Taylor
10 December 1999