Add facility to record HTTP requests to Pazpar2
[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>-p <replaceable>pidfile</replaceable></option></arg>
38    <arg choice="opt"><option>-R <replaceable>recfile</replaceable></option></arg>
39    <arg choice="opt"><option>-t</option></arg>
40    <arg choice="opt"><option>-u <replaceable>uid</replaceable></option></arg>
41    <arg choice="opt"><option>-V</option></arg>
42    <arg choice="opt"><option>-v <replaceable>level</replaceable></option></arg>
43    <arg choice="opt"><option>-X</option></arg>
44    <arg choice="opt"><option>-install</option></arg>
45    <arg choice="opt"><option>-remove</option></arg>
46   </cmdsynopsis>
47  </refsynopsisdiv>
48  
49  <refsect1><title>DESCRIPTION</title>
50   <para><command>pazpar2</command> is the Pazpar2 Metasearch daemon
51    and server.
52    In normal operation it acts as a simple HTTP server which serves
53    the Pazpar2 protocol.
54    The HTTP listener address may be given on the command line using
55    option <option>-h</option> or in the main configuration
56    file. The main configuration must be specified using option
57    <option>-f</option>.
58   </para>
59  </refsect1>
60  
61  <refsect1><title>OPTIONS</title>
62   <para></para>
63   
64   <variablelist>
65    <varlistentry>
66     <term><option>-d</option></term>
67     <listitem>
68      <para>
69       Enables dump of XML records to the current log file.
70       It is useful if stylesheets are being debugged.
71      </para>
72      <para>
73       This option may also be used together with option <option>-t</option>
74       in which case the configuration, after include processing, will be
75       dumped to stdout.
76      </para>
77     </listitem>
78    </varlistentry>
79    <varlistentry>
80     <term><option>-D</option></term>
81     <listitem>
82      <para>Puts the Pazpar2 server in the background.</para>
83     </listitem>
84    </varlistentry>
85    <varlistentry>
86     <term><option>-f <replaceable>config</replaceable></option></term>
87     <listitem>
88      <para>
89       Specifies main configuration. This option must be specified
90       in order for Pazpar2 to operate normally.
91      </para>
92     </listitem>
93    </varlistentry>
94    <varlistentry>
95     <term><option>-h <replaceable>ip:port</replaceable></option></term>
96     <listitem>
97      <para>
98       Specifies the HTTP listener binding address.
99       The <replaceable>ip</replaceable>
100       may be a hostname or <literal>@</literal> for "any" address.
101       The <replaceable>port</replaceable> is an integer.
102      </para>
103     </listitem>
104    </varlistentry>
105    <varlistentry>
106     <term><option>-l <replaceable>logfile</replaceable></option></term>
107     <listitem>
108      <para>
109       Specifies log file. The log file must be specified when Pazpar2
110       is running in the background (-D).
111      </para>
112     </listitem>
113    </varlistentry>
114    <varlistentry>
115     <term><option>-p <replaceable>pidfile</replaceable></option></term>
116     <listitem>
117      <para>
118       Specifies PID file. If Pazpar2 is started and configured properly
119       the file given holds the process ID of the Pazpar2 process.
120      </para>
121     </listitem>
122    </varlistentry>
123    <varlistentry>
124     <term><option>-R <replaceable>recfile</replaceable></option></term>
125     <listitem>
126      <para>
127       If this option is given, HTTP requests are logged to file named
128       <replaceable>recfile</replaceable>.
129      </para>
130     </listitem>
131    </varlistentry>
132
133    <varlistentry>
134     <term><option>-t</option></term>
135     <listitem>
136      <para>
137       Checks parameters and configuration. No service or daemon is
138       started. Useful for checking a new configuration before a
139       Pazpar2 is restarted.
140      </para>
141      <para>
142       The configuration, after include processing, may also be dumped
143       to stdout by supplying option <option>-d</option> as well.
144      </para>
145      <note>
146       <para>
147        In Pazpar2 1.2 and earlier releases, option -t specified a
148        local target settings file.
149       </para>
150      </note>
151     </listitem>
152    </varlistentry>
153
154    <varlistentry>
155     <term><option>-u <replaceable>uid</replaceable></option></term>
156     <listitem>
157      <para>
158       Makes the Pazpar2 server change user ID to the
159       <replaceable>uid</replaceable> given.
160       This, normally, requires root privilege.
161      </para>
162     </listitem>
163    </varlistentry>
164
165    <varlistentry>
166     <term><option>-V</option></term>
167     <listitem>
168      <para>
169       Shows Pazpar2 version and versions of some of the components that it
170       is using (ICU and YAZ). Pazpar2 will exit immediately after
171       displaying the version information (no daemon started).
172      </para>
173     </listitem>
174    </varlistentry>
175
176    <varlistentry>
177     <term><option>-v <replaceable>level</replaceable></option></term>
178     <listitem>
179      <para>
180       Sets log level (YAZ log level system).
181      </para>
182     </listitem>
183    </varlistentry>
184
185    <varlistentry>
186     <term><option>-X</option></term>
187     <listitem>
188      <para>
189       Makes the Pazpar2 server operate in debugging mode.
190       This prevents Pazpar2 from making separate threads and processes.
191       This option should not be used in production.
192      </para>
193     </listitem>
194    </varlistentry>
195
196    <varlistentry>
197     <term><option>-install</option></term>
198     <listitem>
199      <para>
200        This is an option which is only recognized on Windows. It installs
201        Pazpar2 as a Windows Service.
202      </para>
203      <note>
204        <para>
205          Pazpar2 only supports Windows Service options if Pazpar2 is
206          linked against YAZ 3.0.29 or later.
207        </para>
208      </note>
209     </listitem>
210    </varlistentry>
211
212    <varlistentry>
213     <term><option>-remove</option></term>
214     <listitem>
215      <para>
216        This is an option which is only recognized on Windows. It removes
217        a Pazpar2 - Windows Service.
218      </para>
219     </listitem>
220    </varlistentry>
221
222   </variablelist>
223   
224  </refsect1>
225  
226  <refsect1><title>EXAMPLES</title>
227   <para>The Debian package of pazpar2 starts the server with:
228    <screen>
229     pazpar2 -D -f /etc/pazpar2/pazpar2.cfg -l /var/log/pazpar2.log -p /var/run/pazpar2.pid -u nobody
230    </screen>
231    (one line). 
232   </para>
233   <para>
234    This will put pazpar2 in the background (-D), read config from from
235    <filename>/etc/pazpar2/pazpar2.cfg</filename>, log messages to
236    <filename>/var/log/pazpar2.log</filename>, create PID file
237    <filename>/var/run/pazpar2.pid</filename>. When the daemon is properly
238    started, the server will change effective user ID to nobody.
239   </para>
240   <para>
241    The server can be terminated with:
242    <screen>
243     kill `cat /var/run/pazpar2.pid`
244    </screen>
245   </para>
246   <para>
247    If Pazpar2 is to be debugged using GDB, we use option -X:
248    <screen>
249     cd pazpar2/src
250     gdb ./pazpar2
251     (gdb) run -X -f ../etc/pazpar2.cfg
252    </screen>
253   </para>
254  </refsect1> 
255  
256  <refsect1><title>FILES</title>
257   <para><filename>/usr/sbin/pazpar2</filename>: pazpar2 daemon</para>
258
259   <para><filename>/usr/share/pazpar2</filename>: pazpar2 shared files</para>
260
261   <para><filename>/etc/pazpar2</filename>: pazpar2 config area</para>
262  </refsect1>
263  
264  <refsect1><title>SEE ALSO</title>
265   <para>
266    Pazpar2 configuration:
267    <citerefentry>
268     <refentrytitle>pazpar2_conf</refentrytitle>
269     <manvolnum>5</manvolnum>
270    </citerefentry>
271   </para>
272   <para>
273    Pazpar2 protocol:
274    <citerefentry>
275     <refentrytitle>pazpar2_protocol</refentrytitle>
276     <manvolnum>7</manvolnum>
277    </citerefentry>
278   </para>
279  </refsect1>
280
281 </refentry>
282
283
284 <!-- Keep this comment at the end of the file
285 Local variables:
286 mode: sgml
287 sgml-omittag:t
288 sgml-shorttag:t
289 sgml-minimize-attributes:nil
290 sgml-always-quote-attributes:t
291 sgml-indent-step:1
292 sgml-indent-data:t
293 sgml-parent-document:nil
294 sgml-local-catalogs: nil
295 sgml-namecase-general:t
296 End:
297 -->