3. Installation of test interfaces

In this section we show how to make available the set of simple interfaces that are part of the Pazpar2 source package, and which demonstrate some ways to use Pazpar2. (Note that Debian users can save time by just installing the package pazpar2-test1.)

A web server, such as Apache, must be installed and running on the system.

Start the Pazpar2 daemon using the 'in-source' binary of the Pazpar2 daemon. On Unix the process is:

     cd etc
     cp pazpar2.cfg.dist pazpar2.cfg
     ../src/pazpar2 -f pazpar2.cfg
    

And on Windows:

     cd etc
     copy pazpar2.cfg.dist pazpar2.cfg
     ..\bin\pazpar2 -f pazpar2.cfg
    

This will start a Pazpar2 listener on port 9004. It will proxy HTTP requests to port 80 on localhost, 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 pazpar2.cfg file includes settings from the file settings/testserver.xml to use for searches. That uses a single local target. If you do not yet have a local information server running (e.g. yaz-ztest) then adjust the target settings to refer to a known public server. Alternatively, adjust the default.xml to refer to a different set of targets (e.g. settings/edu.xml).

The test UIs are located in www. Ensure that this directory is available to the web server, either by copying www to the document root, using Apache's Alias directive, or creating a symbolic link: for example, on a Debian or Ubuntu system with Apache2 installed from the standard package, you might make the link as follows:

     cd .../pazpar2
     sudo ln -s `pwd`/www /var/www/pazpar2-demo
    

This makes the test applications visible at http://localhost/pazpar2-demo/ but they can not be run successfully from that URL, as they submit search requests back to the server from which they were served, and Apache2 doesn't know how to handle them. Instead, the test applications must be accessed from Pazpar2 itself, acting as a proxy to Apache2, at the URL http://localhost:9004/pazpar2-demo/

From here, the demo applications can be accessed: test1, test2 and jsdemo are pure HTML+JavaScript setups, needing no server-side intelligence; demo requires PHP on the server. The jsdemo also needs pazpar2/js/pz2.js to be available to the webserver.

If you don't see the test interfaces, check whether they are available on port 80 (i.e. directly from the Apache2 server). If not, the Apache configuration is incorrect.

In order to use Apache as frontend for the interface on port 80 for public access etc., refer to Section 6, “Apache 2 Proxy”.