Installation of the HEART-2DPAGE Software


Contents


Introduction

This document describes how to install the HEART-2DPAGE software. It doesn't describe how to setup a WWW server.


License terms

HEART-2DPAGE is Copyright 1995, 1996.

Permission to copy and distribute HEART-2DPAGE in its entirety, for non-commercial purposes, is hereby granted without fee, provided that this license information and copyright notice appear in all copies.

If you redistribute HEART-2DPAGE, the *entire* contents of this distribution must be distributed.

The software may be modified for your own purposes, but modified versions may not be distributed without prior consent of the author.

This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software .


Requirements

To install and run the HEART-2DPAGE software you need a already installed WWW server and the programming language perl. You will also need a C compiler (ANSI C) like gcc.

The HEART-2DPAGE software uses the gd library for manipulating gif images. gd library is copyright 1994, Quest Protein Database Center, Cold Spring Harbor Labs and is written by Thomas Boutell. The library (version 1.1.1) is included in this package.


Installation

This package is a compressed (gzip) tar archive. To unpack into the current directory use:

gtar -zxf HEART-2DPAGE.tar.gz
or:
gzip -dc HEART-2DPAGE.tar.gz | tar -xf -

The archive includes:

Not included:


Installation of the C programs

Run the shell script BUILD in the directory DB-software-sources/.

BUILD compile all C programs in their corresponding directoy including gd library, imagemap, findlink and utilities for manipulating gif images (gifcrossxy, gifshadow, gifzoom ...). In addition the executable programs imagemap, findlink, gifcrossxy and gifshadow are copied into the cgi directory 2dprot/script because they are used as cgi scripts.

For systems running SunOs 4.* the script BUILD.sunos4 should be used. Arising linker warnings like "warning: table of contents for archive is out of date, ..." can be ignored.


Installation of the CGI scripts

The HEART-2DPAGE makes use of executable server scripts (CGI scripts) to produce documents on the fly. This section describes how to configure these scripts. The configuration is somewhat difficult because different scripts exist and some things have be done:

  1. Setting up the Perl Environment
  2. Most of the CGI scripts are written in perl. These scripts require the perl interpreter to be at /usr/local/bin/perl.

    If your perl interpreter stays at another place you can do one of the following:

    1. make a link (probably you have to login as root to do this):

      ln -s /your/directory/perl /usr/local/bin/perl .

      Assuming your perl interpreter is at /usr/bin/perl then use:

      ln -s /usr/bin/perl /usr/local/bin/perl

    2. change the first line of each of the following perl scripts in the directory 2dprot/script:

      • Parse
      • ReadConf
      • get-2d-entry
      • markquadrant
      • nph-startgifcrossxy
      • nph-startgifcrossxy.lg
      • picture
      • picture.lg
      • startimagemap.lg
      • startimagemap.sml
      • zoom

      Use an editor to change the first line from '#!/usr/local/bin/perl' to '#!/your/directory/perl'.

      Assuming your perl interpreter is at /usr/bin/perl then change the first line from

      #!/usr/local/bin/perl to #!/usr/bin/perl

  3. Making the CGI scripts World Wide Web-accessible
  4. To make the CGI scripts accessible by the World Wide Web you can:

    1. copy the CGI scripts from 2dprot/script into the WWW server's cgi-bin directory

    2. reconfigure your WWW server by adding a new translation rule to the WWW server's configuration file.
      For instance this could be done for the CERN WWW Server by: 'Exec /cgi-bin/dhzb/* /directory/you/unpacked/this/package/2dprot/script/*'.

    For details consult the documentation of your WWW server.

  5. Configuration of most of the CGI scripts
  6. The CGI scripts get-2d-entry, markquadrant, nph-startgifcrossxy, nph-startgifcrossxy.lg, picture, picture.lg, startimagemap.lg, startimagemap.sml and zoom are written in perl. They are configured by the configuration file 'Heart-CGI.conf'.

    The configuration file 'Heart-CGI.conf' consists of lines with the format: entry = value. Comments can be inserted. A comment starts with a hash sign # and ends at the end of line.

    Example:

    # # Configuration file for the HEART-2DPAGE # # Directories where the server finds the CGI-scripts and images # CGIDir = /home/pleiss/heart-2dpage/2dprot/script ImageDir = /home/pleiss/heart-2dpage/2dprot/images # Directory to save temporary data # TempDir = /tmp You have to setup your own configuration file. Copy your 'Heart-CGI.conf' into the directory the CGI scripts are started by the WWW server.

    You can use 2dprot/script/Heart-CGI.conf as basis; adapt it to your own needs.

    The configuration file must contain values for each of the following entries:

    CGIDir dir

    This entry sets the (real) directory the cgi scripts are located. dir is an absolute path of the directory on the server the cgi scripts can be found. This entry is used by cgi scripts to start other scripts. For example:

    CGIDir = /home/pleiss/2dprot/script

    ImageDir dir

    This entry sets the (real) directory the images are located. dir is an absolute path of the directory on the server the images can be found. This entry is used by cgi scripts to access images on the fly. For example:

    ImageDir = /home/pleiss/2dprot/images

    TempDir dir

    This entry sets the (real) directory the scripts can store temporary data. dir is an absolute path of the directory on the server the data can be stored. For example:

    TempDir = /tmp

    BinDir dir

    This entry sets the (real) directory the scripts can find the unix commands 'rm' and 'cp'. dir is an absolute path of the directory on the server the scripts look for 'rm' and 'cp'. For example:

    BinDir = /usr/bin

    HomeURL url

    This entry sets the URL of the (virtual) home directory of the HEART-2DPAGE. url is an URL pointing to the directory the HEART-2DPAGE starts.

    For example:

    HomeURL = http://www.chemie.fu-berlin.de/user/pleiss

    Because of browser capabilities this one works too:

    HomeURL = /user/pleiss

    The HomeURL entry is used by cgi scripts to generate hypertext links within HTML documents. These links can then point to other HEART-2DPAGE pages.

    HomepageURL url

    This entry sets the URL of the home page of the HEART-2DPAGE. url is an URL pointing to the home page of the HEART-2DPAGE. For example:

    For example:

    HomepageURL = http://www.chemie.fu-berlin.de/user/pleiss/dhzb.html

    Because of browser capabilities this one works too:

    HomeURL = /user/pleiss/dhzb.html

    ImageURL url

    This entry sets the URL of the (virtual) directory the images are in. url is an URL pointing to the directory the images for the HEART-2DPAGE can be found.

    For example:

    ImageURL = http://www.chemie.fu-berlin.de/user/pleiss/images

    Because of browser capabilities this one works too:

    ImageURL = /user/pleiss/images

    CGIURL url

    This entry sets the URL for the (virtual) directory the cgi scripts can be executed. url is an URL pointing to the directory the server can find and execute the cgi scripts.

    For example:

    CGIURL = http://www.chemie.fu-berlin.de/cgi-bin/dhzb

    Because of browser capabilities this one works too:

    ImageURL = /cgi-bin/dhzb

    A sample 'Heart-CGI.conf'.

  7. Configuration of Imagemap
  8. To use clickable images you have to create an imagemap configuration file. The name and path of the configuration file is selected within the C source code of imagemap. To change name and path of the configuration you have to edit the source code DB-software-sources/imagemap/imagemap.c at line 60. Then you have to recompile imagemap.c.

    Change line 60: #define CONF_FILE "/usr/local/etc/httpd/conf/imagemap.conf" To: #define CONF_FILE "<path_to_your_conffile>/imagemap.conf" For details about imagemap and map files read the Imagemap documentation .

    To create map files for clickable images use the program Mapedit. You can get it from www.boutell.com/mapedit.


Documentation


Known problems

If you have problems, feel free to write an email to Stefan Sander.


Author: Stefan Sander, Email: sanderst@cs.tu-berlin.de, Date: 12-Sep-96