Note on Windows service only available for YAZ 3.0.29.
[pazpar2-moved-to-github.git] / doc / book.xml
index e469cba..aae3a77 100644 (file)
@@ -9,7 +9,6 @@
      <!ENTITY % idcommon SYSTEM "common/common.ent">
      %idcommon;
 ]>
-<!-- $Id: book.xml,v 1.18 2007-06-20 07:41:58 adam Exp $ -->
 <book id="book">
  <bookinfo>
   <title>Pazpar2 - User's Guide and Reference</title>
@@ -22,6 +21,9 @@
   <author>
    <firstname>Marc</firstname><surname>Cromme</surname>
   </author>
+  <author>
+   <firstname>Jakub</firstname><surname>Skoczen</surname>
+  </author>
   <releaseinfo>&version;</releaseinfo>
   <copyright>
    <year>&copyright-year;</year>
@@ -35,7 +37,7 @@
     and faceted results.
    </simpara>
    <simpara>
-    This document is a guide and reference to Pazpar version &version;.
+    This document is a guide and reference to Pazpar2 version &version;.
    </simpara>
    <simpara>
     <inlinemediaobject>
@@ -55,7 +57,7 @@
   <para>
    Pazpar2 is a stand-alone metasearch client with a web-service API, designed
    to be used either from a browser-based client (JavaScript, Flash, Java,
-   etc.), from from server-side code, or any combination of the two.
+   etc.), from server-side code, or any combination of the two.
    Pazpar2 is a highly optimized client designed to
    search many resources in parallel. It implements record merging,
    relevance-ranking and sorting by arbitrary data content, and facet
  <chapter id="installation">
   <title>Installation</title>
   <para>
+   The Pazpar2 package very small. It includes documentation as well
+   as the Pazpar2 server. The package also includes a simple user
+   interface test1 which consists of a single HTML page and a single
+   JavaScript file to illustrate the use of Pazpar2.
+  </para>
+  <para>
    Pazpar2 depends on the following tools/libraries:
    <variablelist>
     <varlistentry><term><ulink url="&url.yaz;">YAZ</ulink></term>
      <listitem>
       <para>
-       The popular Z39.50 toolkit for the C language. YAZ must be
-       compiled with Libxml2/Libxslt support.
+       The popular Z39.50 toolkit for the C language.
+       YAZ <emphasis>must</emphasis> be compiled with Libxml2/Libxslt support.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
   <para>
-   In order to compile Pazpar2 an ANSI C compiler is
-   required. The requirements should be the same as for YAZ.
+   In order to compile Pazpar2, a C compiler which supports C99 or later
+   is required.
   </para>
 
   <section id="installation.unix">
     The latest source code for Pazpar2 is available from
     <ulink url="&url.pazpar2.download;"/>.
      Only few systems have none of the required
-     tools binary packages. If, for example, Libxml2/libXSLT are already
-    installed as development packages use these.
+     tools binary packages.
+     If, for example, Libxml2/libXSLT libraries
+    are already installed as development packages use these.
    </para>
    
    <para>
     su
     make install
    </screen>
+   <para>
+    The <literal>make install</literal> will install manpages as well as the
+    Pazpar2 server, <literal>pazpar2</literal>, 
+    in PREFIX<literal>/sbin</literal>.
+    By default, PREFIX is <literal>/usr/local/</literal> . This can be
+    changed with configure option <option>--prefix</option>.
+   </para>
+  </section>
+
+  <section id="installation.win32">
+    <title>Installation on Windows (from Source)</title>
+    <para>
+      Pazpar2 can be built for Windows using
+      <ulink url="&url.vstudio;">Microsoft Visual Studio</ulink>.
+      The support files for building YAZ on Windows are located in the
+      <filename>win</filename> directory. The compilation is performed
+      using the <filename>win/makefile</filename> which is to be
+      processed by the NMAKE utility part of Visual Studio.
+    </para>
+    <para>
+      Ensure that the development libraries + header files are
+      available on your system before compiling Pazpar2. For installation
+      of YAZ, refer to the YAZ installation chapter.
+      It is easiest if YAZ and Pazpar2 are unpacked in the same
+      directory (side-by-side).
+    </para>
+    <para>
+      The compilation is tuned by editing the makefile of Pazpar2.
+      The process is similar to YAZ. Adjust the various directories
+      <literal>YAZ_DIR</literal>, <literal>ZLIB_DIR</literal>, ..
+    </para>
+    <para>
+      Compile Pazpar2 by invoking <application>nmake</application> in
+      the <filename>win</filename> directory.
+      The resulting binaries of the build process are located in the
+      <filename>bin</filename> of the Pazpar2 source
+      tree - including the <filename>pazpar2.exe</filename> and necessary DLLs.
+    </para>
+    <para>
+      The Windows version of Pazpar2 is a console application. It may
+      be installed as a Windows Service by adding option 
+      <literal>-install</literal> for the pazpar2 program. This will
+      register Pazpar2 as a service and use the other options provided
+      in the same invocation. For example:
+      <screen>
+       cd \MyPazpar2\etc
+       ..\bin\pazpar2 -install -c pazpar2.cfg -l pazpar2.log
+      </screen>
+      The Pazpar2 service may now be controlled via the Service Control
+      Panel. It may be unregistered by passing the <literal>-remove</literal>
+      option. Example:
+      <screen>
+       cd \MyPazpar2\etc
+       ..\bin\pazpar2 -remove
+      </screen>
+    </para>
+  </section>
+
+  <section id="installation.test1">
+   <title>Installation of test1 interface</title>
+   <para>
+    In this section we outline how to install a simple interface that
+    is part of the Pazpar2 source package. Note that Debian users can
+    save time by just installing package <literal>pazpar2-test1</literal>.
+   </para>
+   <para>
+    A web server must be installed and running on the system, such as Apache.
+   </para>
+
+   <para>
+    Start the Pazpar2 daemon using the 'in-source' binary of the Pazpar2
+    daemon. On Unix the process is:
+    <screen>
+     cd etc
+     cp pazpar2.cfg.dist pazpar2.cfg
+     ../src/pazpar2 -f pazpar2.cfg -t edu.xml
+    </screen>
+    And on Windows:
+    <screen>
+     cd etc
+     copy pazpar2.cfg.dist pazpar2.cfg
+     ..\bin\pazpar2 -f pazpar2.cfg -t edu.xml
+    </screen>
+    This will start a Pazpar2 listener on port 8004. It will proxy 
+    HTTP requests to localhost - port 80, which we assume will be the regular
+    HTTP server on the system. Inspect and modify pazpar2.cfg as needed
+    if this is to be changed. The -t option specifies the list of targets
+    to use for searches.
+   </para>
+   <para>
+    Make a new console and move to the other stuff.
+    For more information about pazpar2 options refer to the manpage.
+   </para>
+
+   <para>
+    The test1 UI is located in <literal>www/test1</literal>. Ensure this
+    directory is available to the web server by either copying 
+    <literal>test1</literal> to the document root, create a symlink or
+    use Apache's <literal>Alias</literal> directive.
+   </para>
+
+   <para>
+    The interface test1 interface should now be available on port 8004.
+   </para>
+   <para>
+    If you don't see the test1 interface. See if test1 is really available
+    on the same URL but on port 80. If it's not, the Apache configuration
+    (or other) is not correct. 
+   </para>
+   <para>
+    In order to use Apache as frontend for the interface on port 80
+    for public access etc., refer to 
+    <xref linkend="installation.apache2proxy"/>.
+   </para>
   </section>
 
   <section id="installation.debian">
    <para>
     Index Data provides Debian packages for Pazpar2. These are prepared
     for Debian versions Etch and Lenny (as of 2007).
-    Theses packages are available at
+    These packages are available at
     <ulink url="&url.pazpar2.download.debian;"/>.
    </para>
   </section>
     you decide which data elements of the source record you are
     interested in, and you specify any desired massaging or combining of
     elements using an XSLT stylesheet (MARC records are automatically
-    normalized to MARCXML before this step). If desired, you can run
-    multiple XSLT stylesheets in series to accomplish this, but the
-    output of the last one should be a representation of the record in a
-    schema that Pazpar2 understands.
+    normalized to <ulink url="&url.marcxml;">MARCXML</ulink> before this step).
+    If desired, you can run multiple XSLT stylesheets in series to accomplish
+    this, but the output of the last one should be a representation of the
+    record in a schema that Pazpar2 understands.
    </para>
 
    <para>
    </para>
   </section>
 
+  &sect-ajaxdev;
+
   <section id="nonstandard">
    <title>Connecting to non-standard resources</title>
    <para>