LBLlogo

Installing LBNL ImgLib software



Table of Contents

Contents of distribution

The ImgLib software consists of a number of scripts (mostly in Perl V5, some in C) which are called by a standard HTTP daemon. I use NSCA HTTPD version 1.4 and Apache/1.2.4 but anything that uses the same format htaccess files should work.

ImgLib also uses the following publicly available library packages:

You can get the source for all the scripts and SOLARIS 2.5.1 binaries for all the support programs from this site. If you want to install this on a different Unix OS, you will need to get sources or binaries for the library packages from the sources mentioned above.

ImgLib.tar.Z contains:

HTTPD.tar.Z contains:

If you are already running an HTTPD server you may not need mine, but you may want to look at how the conf files should be set up.

If you already have versions of any the the support libraries, you can just change the scripts to point to them.

Installing ImgLib scripts only

cd to a directory that is accessible by your httpd server either directly or via a symlink from the servers document directory. The release is set up to assume /tmp/TINSTALL, so if you chose that you will need to do less editing.
then

        zcat ImgLib.tar.Z | tar xvf -

Installing HTTPD binaries and ImgLib scripts

Note: only Solaris 2.5.1 binaries are available. cd to a directory that will become the servers <ServerRoot> directory. The last component of the name is normally http. e.g. /usr/etc/http

        zcat HTTPD.tar.Z | tar xvf -

Then in the http directory create a subdirectory htdocs, cd to it and

        zcat ImgLib.tar.Z | tar xvf -

Editing the HTTP configuration files

Assumptions

If you are already running an httpd server you may just want to use it. There are a few things that my scripts assume about the server configuration.

Files to edit

HTTPD is a standard Apache httd_1.2.4 server. These changes must be made to the distribution you get from me or the standard distribution. In the files you get from me <ServerRoot> is set to /home/imglib2/http and <DocumentRoot> is set to /home/imglib2/http/htdocs. Documention on how to configure a NCSA HTTP server can be found at:http://hoohoo.ncsa.uiuc.edu/docs/setup/access/Overview.html

<ServerRoot>/conf/httpd.conf

<ServerRoot>/conf/srm.conf

  • DocumentRoot
  • the Alias for /icons and /ftp
  • the ScriptAlias
  • <ServerRoot>/conf/access.conf

    <Directory /<ServerRoot>/cgi-bin>
    Options FollowSymLinks
    </Directory>
    
    <Directory /<DocumentRoot>>
    Options Indexes FollowSymLinks IncludesNoExec
    # The following allows the restrictions to be set for individual collections
    AllowOverride All
    <Limit GET>
    order allow,deny
    allow from all
    </Limit>
    

    Editing the ImgLib files

    Assumptions

    Note: The distributed files assume that they were downloaded into /tmp/TINSTALL. You can download them to that directory on your system and put a link from your HTTPD <ServerRoot>/htdocs directory to /tmp/TINSTALL/ImgLib to try things out. If you choose to set up your own collections you will want to move to a more stable location. In my setup ImgLib is a subdirectory of <ServerRoot>/htdocs. The ImgLib_support files can be moved into /usr/local subdirectories. ImgLib/COLLECTIONS is the top of the directory tree where all the derived files for the images are stored.

    All the ImgLib html and script files are in ...ImgLib, ...ImgLib/wforms and ...ImgLib/tools.

    The subdirectory wforms contains files that are only used during modifications to the collections. This directory's htaccess file should only allow access to users who are collection owners.

    The subdirectory tools contains scripts that are only called by other scripts.

    Files to edit

    ImgLib/definitions.pl
    The file contains most of the site dependent definitions and must be edited to reflect the <ServerRoot> of your server. It also contains the home directories for the netpbm binaries, the jpeg conversion binaries and the glimpse_index binaries.

    ImgLib/{makeindex}
    This script also needs to contain an explicit reference to the ServerRoot. A link to this script is put into protected collections, so it cannot find the definitions.pl file without help.

    ImgLib/wforms/htaccess
    Fix the absolute path name of the users and groups file. The files it uses should be the ones in <DocumentRoot>/ImgLib/COLLECTIONS/forms.This file must be writeable by the server.

    ImgLib/COLLECTIONS/forms/htaccess

    Template directories and links

    ImgLib/{imgtmp,tmp}
    ImgLib/imgtmp and ImgLib/tmp need to be symlinks to somewhere to create temporary files: e.g./tmp or /var/tmp. The server must be able to write in the directory. It is currently set as a link to /tmp

    ImgLib/COLLECTIONS directory, and all the files contained there need to be writeable by the server.

    ImgLib/COLLECTIONS/forms/{users,groups}
    The all_users group should include all the users who are allowed to write in any collection. The collection_owners group should include all the users allowed to create new collections at the top level. The user file is currently set up with one user, admin, who has the password ImgLib. Authenicating as admin though the Web interface will let you create collections and add new users to curate them. These are standard httpd 1.4 user/group files.

    Source files

    The program cgi-glimpse, which is used to search a glimpse index, must know the location of the <DocumentRoot> and the home of the Glimpse binaries. These can be fixed in ImgLib/src/imglib/Makefile.in and the program rebuilt. cgi-glimpse1.c requires Version 3.6 or later and has been modified to limit searches to particular fields of the tagfiles. cgi-glimpse.c uses Version 2 of Glimpse and only searches over all the text in the tagfile. You can build a cgi-glimpse from either source file. The Makefile(s) are for gnumake, and the makefile(s) are for SOLARIS make.

    src/imglib/Makefile.in

    Once you have edited the src/imglib/Makefile.in (or makefile.in), you need to build and install the cgi-glimpse program. It is installed in ../htdocs/ImgLib.

        cd src/imglib/SOLARIS
        gmake 
         or
        /usr/ccs/bin/make -f makefile
    

    Summary - FILES that need to be edited

    <ServerRoot>/conf: http.conf, srm.conf, access.conf
    <DocumentRoot>/ImgLib: definitions.pl, makeindex
    <DocumentRoot>/ImgLib/wforms/htaccess
    <DocumentRoot>/ImgLib/COLLECTIONS/forms/htaccess
    <DocumentRoot>/ImgLib/src/imglib: Makefile.in

    Starting the Server

    The included script [re]start_http can be used to start the server by hand. You need to be root to start the server with this script.

    The server can be started automatically at boot time on a Solaris system by putting the following script into /etc/rc2.d/S99httpd: First edit the SERVERROOT variable to reflect your installation.

    #!/bin/sh
     
    if [ $1 = "start" ]; then
            if [ -x SERVERROOT/httpd ]; then
                    echo "Starting ImgLib HTTP daemon... "
                    SERVERROOT/httpd  -d SERVERROOT
            fi
            if [ $1 = "stop" ]; then
                    pid=`/usr/bin/ps -e | /usr/bin/grep httpd | /usr/bin/sed -e 's/^  *//' -e
    's/ .*//'`
                    if [ "${pid}" != "" ]; then
                            echo "Stopping http daemon "
                            /usr/bin/kill ${pid}
                    fi
            fi
    fi
    

    Creating a new collection

    Go to the "curator's interface" from the Welcome page. You can authenticate as user admin, password ImgLib. Then use the "create a new collection" option. To add a new user choose the "add to or edit a collection" option on the "curator's interface" page. The last option on the "add or edit" page is "Create or modify a user or group for collection" use this to add or delete users or change passwords of existing users. See the User's guide that is accessible from the "curator's interface" page for more details.

    Trouble shooting

    Once the files have been extracted and edited make sure that all the directories and files in ImgLib/COLLECTIONS are writeable by your server. The main reason the server silently fails to work, is that it does not have write permission in some file it is trying to change.

    When you are adding images to a collection, the addimages script will log its actions and errors in a log file in COLLECTIONS/<cur-collection>/images/imglog

    The HTTPD server logs its accesses and errors in <ServerRoot>/logs/access_log and error_log.

    All the perl scripts need to know where perl is installed. The scripts start with the line #!/usr/local/bin/perl. If you have perl installed somewhere else on your system you will need to put a symlink to it from /usr/local/bin or else edit all the scripts.


    Administrative info for this page

    Image Library Homepage DSD Home page LBNL Home page