I. Installation
 
Required Software
·    A web server with access to a directory that supports CGI execution.  Apache was used to develop NPIB. It can be obtained from http://apache.org
·    Java 1.1.8 or Java 2 runtime environment (JRE). It can downloaded from http://java.sun.com
·    NPIB. Download form.tar from http://www.jwave.vt.edu/npib/npib.tar
 
Optional Software (needed for remote execution)
·    Expect 
·    TCL  
     TCL and Expect are open source applications, which may already be installed on your system.  For Solaris systems they may be obtained at http://www.sunfreeware.com. For other operating systems this may be obtained at http://dev.ajubasolutions.com/.
·    SSH 
 
 
II. Setting up NPIB
        
 
1.) Extact 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, 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 – This directory’s relative web location will be needed when user-created forms are made.
 
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.    
 
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 user’s 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 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:
      
        kriz /export/home/rkriz/npib/npib.commands
 
      This 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: 
 
<username> <full patch to the user’s command file>
 
Add a line to this file for each NPIB user. The format of a user’s command file is discussed in the NPIB General User’s Guide.