A.nnotate Server Installation Guide for Java Servlet engines using Quercus
This chapter includes instructions for installing the A.nnotate server on a Java servlet engine using the Quercus pure java implementation of PHP developed by Caucho. This allows A.nnotate server to be installed without needing Apache or PHP (e.g. on an enterprise server with Java), as Quercus implements a PHP interpreter in Java.
You will also need to refer to the main server installation guide as this guide just covers the Quercus specifics.
Prerequisites
You will need to install a Java servlet container (e.g. Tomcat, Jetty or Resin) and the Quercus Java PHP interpreter.
1. Installing Quercus using Resin servlet container
You can install Quercus on many different servlet containers (Tomcat, Jetty etc); a quick way to get started for development is to download Resin which bundles Quercus, and only depends on you having Java installed. See the resin installation quick start for details.
# on unpacking resin, point your web browser at http://localhost:8080/ # This will be stored in resin-4.0.x/webapps/ROOT/
2. Download and Install A.nnotate
You can download the standard version of the A.nnotate server and unpack into your web application area (e.g. webapps/ROOT/). The only difference from a regular Apache A.nnotate installation is that in php/phpconfig.inc you need to specify the full paths for the folders which are used for storing user documents and private notes:
# edit phpconfig.inc to specify the full file paths of the # docs/ and private/ folders: # # e.g. on windows: $nnotatesite = "localhost:8080"; $nnotatepath = "http://localhost:8080/annotate"; $licenscode = "1234-0000-0000-0000"; $adminusers = array("test@example.com"); $win32bin = "C:/test/resin-4.0.8/webapps/ROOT/annotate/win32/"; $docsdir = "C:/test/resin-4.0.8/webapps/ROOT/annotate/docs/"; $privatedir = "C:/test/resin-4.0.8/webapps/ROOT/annotate/private/"; # for linux you'll need something like: # $win32bin = ""; # $docsdir = "/home/test123/resin-4.0.8/webapps/ROOT/annotate/docs/"; # $privatedir = "/home/test123/resin-4.0.8/webapps/ROOT/annotate/private/";
You need to configure your application server to serve up files in the docs/ folder staticly (e.g. http://localhost:8080/annotate/docs/file123.txt); with Resin this happens automatically (using the built-in FileServlet); other application servers may need a configuration entry to use their servlet:
<-- snippet from resin's conf/app-default.xml to serve files staticly --> <servlet servlet-name="resin-file" servlet-class="com.caucho.servlets.FileServlet"/> <servlet-mapping url-pattern="annotate/docs/" servlet-name="resin-file"/>
3. Update for annotate version4
Annotate version 4 includes linux binaries: the log below includes the steps taken to get annotate running under quercus:
(1) install quercus (under resin here) --- go to: http://www.caucho.com/download/ % mkdir quercus % cd quercus % wget http://www.caucho.com/download/resin-4.0.17.tar.gz % tar xvfz resin-4.0.17.tar.gz % cd resin-4.0.17 % java -jar lib/resin.jar start --- at this point you can put a test php in webapps/ROOT/test.php --- and point your browser at http://localhost:8080/test.php (2) annotate install: --- download: annotate-server-and-api-4.0.8.tgz annotate-linux-binaries-4.0.8.tgz % cd quercus/resin-4.0.17/webapps/ROOT % cp ~/annotate-server-and-api-4.0.8.tgz webapps/ROOT % cd webapps/ROOT % tar xvfz annotate-server-and-api-4.0.8.tgz % tar xvfz annotate-linux-binaries-4.0.8.tgz % make install % cd php % cp phpconfig-linux-static.inc phpconfig.inc --- edit it for your paths and URLs... --- point your browser at http://yoursite.com:8080/index.php
Please email any questions to support [at] nnotate.com.