19e39ec8778ee5d09b9b932ddb8f1e6d89cfa670
[pazpar2-moved-to-github.git] / doc / pazpar2.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
3 [
4      <!ENTITY % local SYSTEM "local.ent">
5      %local;
6      <!ENTITY % entities SYSTEM "entities.ent">
7      %entities;
8      <!ENTITY % idcommon SYSTEM "common/common.ent">
9      %idcommon;
10 ]>
11 <refentry id="pazpar2">
12  <refentryinfo>
13   <productname>Pazpar2</productname>
14   <productnumber>&version;</productnumber>
15   <info><orgname>Index Data</orgname></info>
16  </refentryinfo>
17
18  <refmeta>
19   <refentrytitle>Pazpar2</refentrytitle>
20   <manvolnum>8</manvolnum>
21   <refmiscinfo class="manual">System management commands</refmiscinfo>
22  </refmeta>
23  
24  <refnamediv>
25   <refname>pazpar2</refname>
26   <refpurpose>Metasearch daemon.</refpurpose>
27  </refnamediv>
28  
29  <refsynopsisdiv>
30   <cmdsynopsis>
31    <command>pazpar2</command>
32    <arg choice="opt"><option>-d</option></arg>
33    <arg choice="opt"><option>-D</option></arg>
34    <arg choice="opt"><option>-f <replaceable>config</replaceable></option></arg>
35    <arg choice="opt"><option>-h <replaceable>ip:port</replaceable></option></arg>
36    <arg choice="opt"><option>-l <replaceable>logfile</replaceable></option></arg>
37    <arg choice="opt"><option>-m <replaceable>timeformat</replaceable></option></arg>
38    <arg choice="opt"><option>-p <replaceable>pidfile</replaceable></option></arg>
39    <arg choice="opt"><option>-R <replaceable>recfile</replaceable></option></arg>
40    <arg choice="opt"><option>-t</option></arg>
41    <arg choice="opt"><option>-u <replaceable>uid</replaceable></option></arg>
42    <arg choice="opt"><option>-v <replaceable>level</replaceable></option></arg>
43    <arg choice="opt"><option>-V</option></arg>
44    <arg choice="opt"><option>-w <replaceable>dir</replaceable></option></arg>
45    <arg choice="opt"><option>-X</option></arg>
46    <arg choice="opt"><option>-install</option></arg>
47    <arg choice="opt"><option>-remove</option></arg>
48   </cmdsynopsis>
49  </refsynopsisdiv>
50  
51  <refsect1>
52   <title>DESCRIPTION</title>
53   <para>
54    <command>pazpar2</command> is the Pazpar2 Metasearch daemon
55    and server.
56    In normal operation it acts as a simple HTTP server which serves
57    the Pazpar2 protocol.
58    The HTTP listener address may be given on the command line using
59    option <option>-h</option> or in the main configuration
60    file. The main configuration must be specified using option
61    <option>-f</option>.
62   </para>
63  </refsect1>
64  
65  <refsect1>
66   <title>OPTIONS</title>
67   
68   <variablelist>
69    <varlistentry>
70     <term><option>-d</option></term>
71     <listitem>
72      <para>
73       Enables dump of XML records to the current log file.
74       It is useful if stylesheets are being debugged.
75      </para>
76      <para>
77       This option may also be used together with option <option>-t</option>
78       in which case the configuration, after include processing, will be
79       dumped to stdout.
80      </para>
81     </listitem>
82    </varlistentry>
83    <varlistentry>
84     <term><option>-D</option></term>
85     <listitem>
86      <para>
87      Puts the Pazpar2 server in the background.
88      </para>
89     </listitem>
90    </varlistentry>
91    <varlistentry>
92     <term><option>-f <replaceable>config</replaceable></option></term>
93     <listitem>
94      <para>
95       Specifies main configuration. This option must be specified
96       in order for Pazpar2 to operate normally.
97      </para>
98     </listitem>
99    </varlistentry>
100    <varlistentry>
101     <term><option>-h <replaceable>ip:port</replaceable></option></term>
102     <listitem>
103      <para>
104       Specifies the HTTP listener binding address.
105       The <replaceable>ip</replaceable>
106       may be a hostname or <literal>@</literal> for "any" address.
107       The <replaceable>port</replaceable> is an integer.
108      </para>
109     </listitem>
110    </varlistentry>
111    <varlistentry>
112     <term><option>-l <replaceable>logfile</replaceable></option></term>
113     <listitem>
114      <para>
115       Specifies log file. The log file must be specified when Pazpar2
116       is running in the background (-D).
117      </para>
118     </listitem>
119    </varlistentry>
120    <varlistentry>
121     <term>-m <replaceable>timeformat</replaceable></term>
122     <listitem><para>
123      Sets the format of time-stamps for logging.
124      Refer to the
125        <ulink
126            url="http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html">
127        strftime(3)</ulink>
128        man page for the format.
129     </para></listitem>
130    </varlistentry>
131    <varlistentry>
132     <term><option>-p <replaceable>pidfile</replaceable></option></term>
133     <listitem>
134      <para>
135       Specifies PID file. If Pazpar2 is started and configured properly
136       the file given holds the process ID of the Pazpar2 process.
137      </para>
138     </listitem>
139    </varlistentry>
140    <varlistentry>
141     <term><option>-R <replaceable>recfile</replaceable></option></term>
142     <listitem>
143      <para>
144       If this option is given, HTTP requests are logged to file named
145       <replaceable>recfile</replaceable>.
146      </para>
147     </listitem>
148    </varlistentry>
149
150    <varlistentry>
151     <term><option>-t</option></term>
152     <listitem>
153      <para>
154       Checks parameters and configuration. No service or daemon is
155       started. Useful for checking a new configuration before a
156       Pazpar2 is restarted.
157      </para>
158      <para>
159       The configuration, after include processing, may also be dumped
160       to stdout by supplying option <option>-d</option> as well.
161      </para>
162      <note>
163       <para>
164        In Pazpar2 1.2 and earlier releases, option -t specified a
165        local target settings file.
166       </para>
167      </note>
168     </listitem>
169    </varlistentry>
170
171    <varlistentry>
172     <term><option>-u <replaceable>uid</replaceable></option></term>
173     <listitem>
174      <para>
175       Makes the Pazpar2 server change user ID to the
176       <replaceable>uid</replaceable> given.
177       This, normally, requires root privilege.
178      </para>
179     </listitem>
180    </varlistentry>
181
182    <varlistentry>
183     <term><option>-v <replaceable>level</replaceable></option></term>
184     <listitem>
185      <para>
186       Sets log level (YAZ log level system).
187      </para>
188     </listitem>
189    </varlistentry>
190
191    <varlistentry>
192     <term><option>-V</option></term>
193     <listitem>
194      <para>
195       Shows Pazpar2 version and versions of some of the components that it
196       is using (ICU and YAZ). Pazpar2 will exit immediately after
197       displaying the version information (no daemon started).
198      </para>
199     </listitem>
200    </varlistentry>
201
202    <varlistentry>
203     <term><option>-w <replaceable>dir</replaceable></option></term>
204     <listitem>
205      <para>
206       Changes working directory to <replaceable>dir</replaceable>.
207      </para>
208     </listitem>
209    </varlistentry>
210
211    <varlistentry>
212     <term><option>-X</option></term>
213     <listitem>
214      <para>
215       Makes the Pazpar2 server operate in debugging mode.
216       This prevents Pazpar2 from making separate threads and processes.
217       This option should not be used in production.
218      </para>
219     </listitem>
220    </varlistentry>
221
222    <varlistentry>
223     <term><option>-install</option></term>
224     <listitem>
225      <para>
226       This is an option which is only recognized on Windows. It installs
227       Pazpar2 as a Windows Service.
228      </para>
229      <note>
230       <para>
231        Pazpar2 only supports Windows Service options if Pazpar2 is
232        linked against YAZ 3.0.29 or later.
233       </para>
234      </note>
235     </listitem>
236    </varlistentry>
237
238    <varlistentry>
239     <term><option>-remove</option></term>
240     <listitem>
241      <para>
242       This is an option which is only recognized on Windows. It removes
243       a Pazpar2 - Windows Service.
244      </para>
245     </listitem>
246    </varlistentry>
247
248   </variablelist>
249   
250  </refsect1>
251  
252  <refsect1>
253   <title>EXAMPLES</title>
254   <para>The Debian package of pazpar2 starts the server with:
255    <screen>
256     pazpar2 -D -f /etc/pazpar2/pazpar2.cfg -l /var/log/pazpar2.log -p /var/run/pazpar2.pid -u nobody
257    </screen>
258    (one line). 
259   </para>
260   <para>
261    This will put pazpar2 in the background (-D), read config from from
262    <filename>/etc/pazpar2/pazpar2.cfg</filename>, log messages to
263    <filename>/var/log/pazpar2.log</filename>, create PID file
264    <filename>/var/run/pazpar2.pid</filename>. When the daemon is properly
265    started, the server will change effective user ID to nobody.
266   </para>
267   <para>
268    The server can be terminated with:
269    <screen>
270     kill `cat /var/run/pazpar2.pid`
271    </screen>
272   </para>
273   <para>
274    If Pazpar2 is to be debugged using GDB, we use option -X:
275    <screen>
276     cd pazpar2/src
277     gdb ./pazpar2
278     (gdb) run -X -f ../etc/pazpar2.cfg
279    </screen>
280   </para>
281  </refsect1> 
282  
283  <refsect1>
284   <title>FILES</title>
285   <para><filename>/usr/sbin/pazpar2</filename>: pazpar2 daemon</para>
286   
287   <para><filename>/usr/share/pazpar2</filename>: pazpar2 shared files</para>
288   
289   <para><filename>/etc/pazpar2</filename>: pazpar2 config area</para>
290  </refsect1>
291  
292  <refsect1>
293   <title>SEE ALSO</title>
294   <para>
295    Pazpar2 configuration:
296    <citerefentry>
297     <refentrytitle>pazpar2_conf</refentrytitle>
298     <manvolnum>5</manvolnum>
299    </citerefentry>
300   </para>
301   <para>
302    Pazpar2 protocol:
303    <citerefentry>
304     <refentrytitle>pazpar2_protocol</refentrytitle>
305     <manvolnum>7</manvolnum>
306    </citerefentry>
307   </para>
308  </refsect1>
309
310 </refentry>
311
312 <!-- Keep this comment at the end of the file
313 Local variables:
314 mode: nxml
315 nxml-child-indent: 1
316 End:
317 -->