Installing the Paperclips webserver.

This document is intended to be a quick start to installing and
running Paperclips. It does NOT offer comprehensive information about
how to run the server.


*******

Note: 
throughout this document we refer to PAPERCLIPS-ROOT as the directory in 
which you unpacked the Paperclips distribution.

*******


Contents:
1. Pre-requistes
2. How to compile the Paperclips source
3. Runing Paperclips


1. Pre-requistes

This document is GNU/Linux specific (though it will probably work on
any unic). It shouldn't be difficult to move to Windows but it's not
something that I've thought about yet.

You must have a Java VM installed which conforms to Java 1.2 in security terms.
The latest Kaffe CVS does work but you might be safer with a Sun Java until Kaffe
actually release.



2. How to compile the Paperclips source

Use the standard GNU procedure:

  cd PAPERCLIPS-ROOT
  ./configure
  make

This causes the Paperclips source to be compiled and the
paperclips.jar file to be produced. The jar file is saved in the
current directory.

You can use the --prefix switch to configure to move the installation
directory. 

You can also configure paperclips from a directory other than the
source distribution, eg:

  cd /usr/local/java
  ../PAPERCLIPS-ROOT/configure
  make



3. Running Paperclips

Before you can run Paperclips you must set the CLASSPATH environment
variable. The classpath for Paperclips is the paperclips.jar file plus
everything in the libs directory. On a GNU/Linux box you can construct
a CLASSPATH from a directory automatically like this:

  export CLASSPATH=`ls lib | tr [:space:] :`

To setup for Paperclips you might do this:

  cd PAPERCLIPS-ROOT
  export CLASSPATH=`ls lib | tr [:space:] :`:paperclips.jar


You can then run Paperclips like this and it will explain the command
line options for running the server:

  java gnupaperclips --help


As a quick start you should be able to do this:

  java -jar bin/paperclips.jar -d DIRECTORY -p PORT

where:

   PORT       is the TCP port you want to use; 8080 is popular
   DIRETCORY  is the path of the directory where your html files are

If you don't specify PORT then 7171 is used as the default.

If you don't specify DIRECTORY then Paperclips will look for a
directory called one of the following:

  docroot
  webroot
  www

It will try to find one of those directories, first in the current
directory, then in your home directory and finally in the root directory.

If you don't specify DIRECTORY and Paperclips can't find a default
then no documents will be served.

For more details, including how to run additional "webapps" see the
README file that accompanies this one.



4. JSP files

Paperclips will automatically handle JSP files if it can find the
GNUJSP engine. This is available from:

  http://www.gnu.org/software/java/java-software.html

But it is also distributed with Paperclips, in the lib directory.



4. Stopping Paperclips

You must interrupt the java interpreter on the Paperclips console. Or
kill the process.


$Author: nferrier $
$Date: 2002/02/13 01:41:38 $
