pazpar2 — Metasearch daemon.
pazpar2
[-d
] [-D
] [-f
] [config
-h
] [ip:port
-l
] [logfile
-m
] [timeformat
-p
] [pidfile
-R
] [recfile
-t
] [-u
] [uid
-v
] [level
-V
] [-w
] [dir
-X
] [-install
] [-remove
]
pazpar2 is the Pazpar2 Metasearch daemon
and server.
In normal operation it acts as a simple HTTP server which serves
the Pazpar2 protocol.
The HTTP listener address may be given on the command line using
option -h
or in the main configuration
file. The main configuration must be specified using option
-f
.
-d
Enables dump of XML records to the current log file. It is useful if stylesheets are being debugged. Using this option twice makes Pazpar2 also dump full HTTP responses.
This option may also be used together with option -t
in which case the configuration, after include processing, will be
dumped to stdout.
-D
Puts the Pazpar2 server in the background.
-f config
Specifies main configuration. This option must be specified in order for Pazpar2 to operate normally.
-h ip:port
Specifies the HTTP listener binding address.
The ip
may be a hostname, or @
for "any" address.
The port
is an integer.
-l logfile
Specifies log file. The log file must be specified when Pazpar2 is running in the background (-D).
timeformat
Sets the format of time-stamps for logging. Refer to the strftime(3) man page for the format.
-p pidfile
Specifies PID file. If Pazpar2 is started and configured properly, the file given holds the process ID of the Pazpar2 process.
-R recfile
If this option is given, HTTP requests are logged to file named
recfile
and predictable sessions are enabled.
Using special argument, dash
(-
), will make Pazpar2 use predictable sessions
only (no recording).
This is necessary when playing HTTP communication against pazpar2
with the pazpar2_play program. Refer to Pazpar2_play(1).
-t
Checks parameters and configuration. No service or daemon is started. Useful for checking a new configuration before a Pazpar2 is restarted.
The configuration, after include processing, may also be dumped
to stdout by supplying option -d
as well.
In Pazpar2 1.2 and earlier releases, option -t specified a local target settings file.
-u uid
Makes the Pazpar2 server change user ID to the
uid
given.
This, normally, requires root privilege.
-v level
Sets log level (YAZ log level system).
-V
Shows Pazpar2 version, and versions of some of the components that it is using (ICU and YAZ). Pazpar2 will exit immediately after displaying the version information (no daemon started).
-w dir
Changes working directory to dir
.
-X
Makes the Pazpar2 server operate in debugging mode. This prevents Pazpar2 from making separate threads and processes. This option should not be used in production.
-install
This is an option which is only recognized on Windows. It installs Pazpar2 as a Windows Service.
Pazpar2 only supports Windows Service options if Pazpar2 is linked against YAZ 3.0.29 or later.
-remove
This is an option which is only recognized on Windows. It removes a Pazpar2 - Windows Service.
The Debian package of pazpar2 starts the server with:
pazpar2 -D -f /etc/pazpar2/pazpar2.cfg -l /var/log/pazpar2.log -p /var/run/pazpar2.pid -u nobody
(one line).
This will put pazpar2 in the background (-D), read config from from
/etc/pazpar2/pazpar2.cfg
, log messages to
/var/log/pazpar2.log
, create PID file
/var/run/pazpar2.pid
. When the daemon is properly
started, the server will change effective user ID to nobody.
The server can be terminated with:
kill `cat /var/run/pazpar2.pid`
If Pazpar2 is to be debugged using GDB, we use option -X:
cd pazpar2/src gdb ./pazpar2 (gdb) run -X -f ../etc/pazpar2.cfg