NPIB1.6 User's Guide

by

Ronald D. Kriz*, Associate Professor
Randy T. Levensalor**, Graduate Research Assistant
* Engineering Science and Mechanics, and ** Computer Science
Virginia Polytechnic Institute and State University
Blacksburg, Virginia 24061


Table of Contents:

  1. Introduction
  2. Installation
  3. Set up "public_html" for JWave and NPIB"
  4. "How-to" NPIB-form Tutorials:
  5. Frequently asked questions:
  6. Known bugs:


2.0 Installation

I. Software:

Required Software:

Software Required if NPIB Uses Remote Execution:

NOTE: TCL and Expect are open source applications,
                which may already be installed on your system.

  1. - For Solaris OS go to: http://www.sunfreeware.com.
  2. - For other OS go to: http://dev.ajubasolutions.com/.

II. Setting up NPIB

  1. Extract the contents for the npib.tar file using the command:

            tar -xvf npib.tar

  2. Create a directory for the NPIB support scripts.
    This directory should not be web accessible.

            Example: mkdir /usr/local/npib

  3. Copy ssh.exp, scp.exp, and local.sh to the directory you created in step 2.
    These files should have been extracted from the npib.tar file in step 1.

            Example: cp ssh.exp scp.exp local.sh /usr/local/npib

  4. Create a CGI-accesible directory for the NPIB scripts.

            Example: mkdir /apache/htdocs/cgi-bin

  5. Copy npib.cgi, npib.command, and npib.config to
    the CGI-accesible directory you created in step 4.
    These files should have been extracted from the npib.tar file in step 1.

            cp npib.cgi npib.command npib.config /apache/htdocs/cgi-bin

  6. Create a web-accessible directory for output
    which the web server has permission to write to.

            Example: mkdir /apache/htdocs/output
                             chmod 755 /apache/htdocs/output
                             chown nobody /apache/htdocs/output

  7. Create a web-accessible directory for the Java Form file
    which the web server has permission to write to.

            Example: mkdir /apache/htdocs/form
                             chmod 755 /apache/htdocs/form

    NOTE: The directorys relative web location will be required
                    when users create NPIB forms.

  8. Copy form.jar to the Web-accessible directory you created in step 7.
    (This file should have been extracted from the npib.tar file in step 1.)

    For simplicity we recommend that only one copy of form.jar be included in the
    CLASSPATH by all users. For example on www.jwave.vt.edu, form.jar was
    copied to Web accessible directory shown below.

    Example: http://www.jwave.vt.edu/npib/form.jar

    NOTE: this same form.jar file can be used outside of a Web-accessible
    directory to create NPIB forms. We anticipated that some users will want
    to create NPIB forms on remote workstations. In this case the same form.jar
    file can be placed some where in the users home directory on the remote
    workstation. The NPIB User's Guide section on "How-to-create NPIB-forms"
    will demonstrate how users can build NPIB forms on remote workstations but
    save the NPIB-form file back to the Web server using form.jar.

  9. Edit the npib.config file that you put in the CGI-enabled directory in step 5.
    The npib.config file should look like:

    outroot /www/jwave/output/
    webroot /output/
    commandfile npib.commands
    tempname npib.in
    sshScriptDir /www/jwave/cgi-bin/
    hostname www.jwave.vt.edu
    email rlevensa@spelunker.sv.vt.edu

    Make the following changes:

    outroot - change this to the directory you created in step 6
    webroot - set this to the path of the outroot directory,
                         as seen by the web server.
    commandfile - this does not need to be modified.
                               This file states where the users command files are located.
    tempname - this does not need to be modified
    sshScriptDir - set this to the path of the directory you created in step 2
    hostname - set this to the full dns name of this web server
    email - this address will be the FROM address used when results
                     are mailed to users. Set this as desired.

  10. Edit the npib.cgi file that you put in the CGI-enabled directory in step 5.
    The npib.cgi file should look like:

    #!/bin/sh
    export CLASSPATH
    CLASSPATH=/usr/local/java2/lib/:/apache/htdocs/form/form.jar
    /usr/local/java2/bin/java form.run.CGIReceiver $QUERY_STRING

    Make the following changes:

    a.) Set the CLASSPATH variable to include the jar file from step 8,
           and the standard java runtime classes

    b.) Change the last line of the script so that it points the
           java runtime binary on your machine.

  11. Edit the npib.commands file that you put in the CGI-enabled directory in step 5.
    The npib.commands file should look like:

    Example: kriz /export/home/rkriz/npib/npib.commands

    The npib.commands file will consist of multiple one-line records.
    Each record is used to tell NPIB the commands file for each user.
    A line consists of two fields, delimited by a space:

    <user_output-directory_name> <full patch to the users command file>
    NOTE: in the example given above kriz and rkriz are different
    kriz = <user_output-directory_name>
    rkriz = <user_home-directory_name>

    Add a line to this file for each NPIB user. The format of a
    users command file, npib.commands, is discussed in the next
    section on Set up "public_html" for JWave and NPIB of the
    NPIB User's Guide.

Contact:    Mr. Randy Levensalor  /    Dr. Ron Kriz
Revised 6/24/01
http://www.jwave.vt.edu/crcd/archives/npib1.6/usersguide/installation.html