NPIB1.6 User's Guide


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

2.1. Software:

2.1.1 Required Software:

2.1.2 Additional Software Required if NPIB Uses Remote Execution:

Example: location of files (ssh,expect,tclsh) on local and remote computers

NOTE: TCL and Expect are open source applications, which may
                             already be installed on your system. For open source software
                             on Solaris OS go to:

2.2 Setting up NPIB: Web-server system administrator

2.2.1 Download and extract the contents for the npib.tar file

           Choose a temporary installation directory
           tar -xvf npib.tar

2.2.2 Create a directory for the NPIB support scripts.

           This directory should not be web accessible.

           mkdir /usr/local/npib

2.2.3 Copy ssh.exp, scp.exp, and files to the directory created in step 2.2.2

           These files should have been extracted from the npib.tar file in step 2.2.1

           cp ssh.exp scp.exp /usr/local/npib

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

           mkdir /apache/htdocs/cgi-bin

             i.e. on our Web server we used apache virtual hosting
             where /apach/htdocs/ is replaced with /www/jwave/ and
             "" has been defined as a virtual host.

2.2.5 Copy npib.cgi, npib.command, and npib.config to the CGI directory created in step 2.2.4

           These files should have been extracted from the npib.tar file in step 2.2.1

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

2.2.6 Create a web-accessible "output" directory for archiving simulation results

           This "output" directory is created so that web server has permission to write to it.

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

NOTE: the "output" directory can be located anywhere. For example if
             only one user is using NPIB you can locate the output directory in
             that users ~/public_html/ directory and let that user manage their
             own archived results. For multiple users we have located the output
             directory on an 18GB disk mounted in the /etc/vfstab file at mount
             point /www/jwave/output/ and used cron to check and clean up
             directories that exceed a predetermined number of months/weeks.

2.2.7 Create a web-accessible directory for the Java Form file (form.jar)

           Create this directory so the web server has permission to write to.

                   mkdir /apache/htdocs/form
                   chmod 755 /apache/htdocs/form

             i.e. on our Web-server /www/jwave/npib was created for the Java Form file
                   such that the form.jar file can be accessed at

             NOTE: This directory's relative web location will be required when users create NPIB forms.

2.2.8 Copy form.jar to the Web-accessible Form directory created in step 2.2.7

(This file should have been extracted from the npib.tar file in step 2.2.1)

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


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.

2.2.9 Edit the npib.config file

This file was copied to the CGI-enabled directory in step 2.2.5
The npib.config file should look like:

outroot /www/jwave/output/
webroot /output/
commandfile npib.commands
sshScriptDir /www/jwave/cgi-bin/

Make the following changes:

outroot - change this to the directory you created in step 2.2.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.2.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 (i.e. npib-admin).

2.2.10 Edit the npib.cgi file in the CGI-enabled directory setup in step 2.2.5

The npib.cgi file should look like:

/usr/local/java2/bin/java $QUERY_STRING

Make the following changes:

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

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

2.2.11 Edit npib.commands file in the CGI-enabled directory set up in step 2.2.5

The npib.commands file should look like:

kriz    /export/home/rkriz/public_html/npib/npib.commands
farkas    /export/home/diana/public_html/npib/npib.commands
batra    /export/home/rbatra/public_html/npib/npib.commands

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

<researcher_output-directory_name>   <full path to each user's npib.commands file>

NOTE: in the example given above kriz and rkriz can be different for
easier indentification by Web users who can recall the researcher's
name but not their email name. Often user account names are created
the same as their email names which can be cryptic and hard to remember.

       kriz = <researcher_output-directory_name>   "a name recognized by Web users"
                   which is the directory appended to the outroot path defined in step 2.2.9
       rkriz = <user_home-directory_name>
                   which is the name of the user's home directory

For each new user the Web-server system administrator needs to add one line
to this file for each NPIB user. All other NPIB setup procedures is done by
each user in their respective ~/public_html/ directories. This npib.commands
file discussed above "points-to" the npib.commands file created by each user
in their respective ~/public_html/npib/ directory. The format for the user's
npib.commands file is discussed below in the next section 3.0.

Dr. Ron Kriz
Created 6/24/01 | Revised 2/22/02