summaryrefslogtreecommitdiffstats
path: root/debian/htdig/htdig-3.2.0b6/htdoc/install.html
blob: 440222f36119193d6aea2c756a3905d710ea7fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
  <head>
	<title>
	  ht://Dig: Installation
	</title>
  </head>
  <body bgcolor="#eef7ff">
	<h1>
	  Installation
	</h1>
	<p>
	  ht://Dig Copyright &copy; 1995-2004 <a href="THANKS.html">The ht://Dig Group</a><br>
	  Please see the file <a href="COPYING">COPYING</a> for
	  license information.
	</p>
	<hr size="4" noshade>
	<p>
	  This document will attempt to show the steps needed to build
	  and install the ht://Dig system.<br>
	  The main sections are:
	</p>
	<ul>
	  <li>
		<a href="#simple">For the impatient...</a>
	  </li>
	  <li>
		<a href="where.html">Getting the software</a>
	  </li>
	  <li>
		<a href="#extract">Extracting the software</a>
	  </li>
	  <li>
		<a href="#configure">Configure</a>
	  </li>
	  <li>
		<a href="#compile">Compile</a>
	  </li>
	  <li>
		<a href="#test">Test</a>
	  </li>
	  <li>
		<a href="#install">Install</a>
	  </li>
	  <li>
		<a href="#sharelib">Shared Libraries</a>
	  </li>
	  <li>
		<a href="OSs">Notes for particular operating systems</a>
	  </li>
	</ul>
	<hr noshade>
	<h2>
	  <a name="simple">For the impatient...</a>
	</h2>
	<p>
	  The standard GNU installation process works for ht://Dig.<br>
	  <code>./configure --prefix=/usr/local</code><br>
	  <code>make</code><br>
	  <code>make install</code><br>
	  <code>vi /usr/local/conf/htdig.conf</code><br>
	  <code>/usr/local/bin/rundig</code><br>
	  (The final three commands must be issued as root.)
	</p>
	<hr noshade>
	<p></p>
	<hr noshade>
	<h2>
	  <a name="extract">Extracting the software</a>
	</h2>
	<p>
	  The distribution of ht://Dig is in the form of a gzipped tar
	  file. The name of the file will be something like <code>
	  htdig-3.2.0.tar.gz</code>. To extract, you can use either the GNU
	  tar command as follows:
	</p>
	<blockquote>
	  % <strong>tar xzf <em>tarfile.tar.gz</em></strong>
	</blockquote>
	<p>
	  If you do not have GNU tar, you can do the following:
	</p>
	<blockquote>
	  % <strong>gunzip -c <em>tarfile.tar.gz</em> | tar xf -</strong>
	</blockquote>
	<p>
	  In either case, a new directory will be created under which the
	  distribution will be extracted. The directory it creates will
	  be <code>htdig-</code> followed by the version number.
	</p>
	<hr noshade>
	<h2>
	  <a name="configure">Configure</a>
	</h2>
	<p>
	  Once the distribution has been extracted, change to the newly
	  created directory.<br>
	  In this directory you will need execute the <code>configure</code> program:
	<blockquote>
	  % <strong>./configure</strong>
	</blockquote>
	<p>
	  This program will attempt to determine what your particular
	  system can and can't do.
	</p>
<!--
	<p>
	  The <strong>configure</strong> program may produce some warnings about
	  libguile and guile. Ignore those warnings since they do not
	  affect the ht://Dig program at all.
	</p>
-->
	<p>
	  If you are going to change any of the sources to  ht://Dig, then
	  you can optionally add dependency information
	  to all the Makefiles before running configure with the command
	</p>
	<blockquote>
	  % <strong>automake</strong>
	</blockquote>
	<p>
	  This <strong>only</strong> needs to be done if you are going to change
	  any of the sources to ht://Dig and requires <strong>GCC</strong>.
	</p>
	<p>
	  The <strong>configure</strong> program has some ht://Dig specific options
	  in addition to the standard ones that you get when running
	  <pre>
	  ./configure --help
	  </pre>
	</p>
	<dl>
	  <dt>
		<code>--prefix=DIR</code>
	  </dt>
	  <dd>
		This is where all of the ht://Dig parts will be installed.
		Various other variables will use this value as their base.
		[default=/opt/www]
	  </dd>
	  <dt>
		<code>--bindir=DIR</code>
	  </dt>
	  <dd>
		All the ht://Dig executable programs will go here
		[default=/opt/www/bin].
	  </dd>
	  <dt>
		<code>--with-config-dir=DIR</code>
	  </dt>
	  <dd>
		where your config directory is [default=/opt/www/conf]
	  </dd>
	  <dt>
		<code>--with-default-config-file=FILE</code>
	  </dt>
	  <dd>
		Point this to where all the tools will look for the
		configuration file [default=/opt/www/conf/htdig.conf].
	  </dd>
	  <dt>
		<code>--with-common-dir=DIR</code>
	  </dt>
	  <dd>
		This directory is for files which can be shared between
		different search databases [default=/opt/www/share/htdig].
	  </dd>
	  <dt>
		<code>--with-database-dir=DIR</code>
	  </dt>
	  <dd>
		Set this to the directory where the search databases are
		going to be. (Make sure there is plenty of space on the
		partition you put this on!) [default=/opt/www/var/htdig].
	  </dd>
	  <dt>
		<code>--with-cgi-bin-dir=DIR</code>
	  </dt>
	  <dd>
		The directory where your HTTP server looks for CGI
		programs. This is where htsearch will get installed
		[default=/opt/www/cgi-bin].
	  </dd>
	  <dt>
		<code>--with-image-dir=DIR</code>
	  </dt>
	  <dd>
		Define this to be a place that can be accessed by your web
		server. This is where a couple of images will be installed
		[default=/opt/www/htdocs/htdig].
	  </dd>
	  <dt>
		<code>--with-image-url-prefix=LOCATION</code>
	  </dt>
	  <dd>
		This is the URL which points to the directory specified by
		the <code>--with-image-dir=DIR</code> option above
		[default=/htdig].
	  </dd>
	  <dt>
		<code>--with-search-dir=FILE</code>
	  </dt>
	  <dd>
		where the sample search form should be installed
		[default=/opt/www/htdocs/htdig].
	  </dd>
	  <dt>
		<code>--with-search-form=FILE</code>
	  </dt>
	  <dd>
		The name of the file in which the sample search form will
		be installed, relative to the directory specified with
		<code>--with-search-dir=DIR</code> [default=search.html]. 
	  </dd>
	</dl>
	<hr noshade>
	<h2>
	  <a name="compile">Compile</a>
	</h2>
	<p>
	  The configure program will have created Makefiles in all the
	  important directories. 
	<p>
	  If <strong>make</strong> is not able to deal with the generated Makefiles,
	  you should probably obtain 
	  <a href="ftp://ftp.gnu.org/pub/gnu/">GNU make</a>.
	</p>
	<p>
	  Now build the complete system with
	</p>
	<blockquote>
	  % <strong>make</strong>
	</blockquote>
	<p>
	  (Sit back and relax for a while...)
	</p>
	<p>
	  If the compilation failed with the error that it cannot find
	  libht.a, the most likely problem is that your system does not
	  have libstdc++ installed. Please check the
	  <a href="require.html">system requirements</a> for details on this.
	</p>
	<hr noshade>
	<h2>
	  <a name="test">Test</a>
	</h2>
	<p>
	  Once built, you can run tests if you provided the
	  <code>--enable-tests</code> at configure time. These tests
	  require that you have a working
	  <a href=http://www.apache.org/>Apache</a> daemon available with
	  version &gt;= 1.3.1. To run the tests execute:
	</p>
	<p>
	  If your <a href=http://www.apache.org/>Apache</a> daemon is 
	  installed in a non standard place, specify it with the 
	  <code>--with-apache=PATH</code> configure option.
	</p>
	<blockquote>
	  % <strong>make check</strong>
	</blockquote>
	<hr noshade>
	<h2>
	  <a name="install">Install</a>
	</h2>
	<p>
	  Everything should have built at this point. To install the
	  software, you need to execute
	</p>
	<blockquote>
	  % <strong>make install</strong>
	</blockquote>
	<p>
	  This will perform several tasks. It will first attempt to
	  create the directories that you specified to <strong>./configure</strong>.
	  It will then copy the following programs to the <code>
	  --bindir=DIR</code> directory:
	</p>
	<ul>
	  <li>
		htdig
	  </li>
	  <li>
		htmerge
	  </li>
	  <li>
		htfuzzy
	  </li>
	  <li>
		htnotify
	  </li>
	  <li>
		htdump
	  </li>
	  <li>
		htstat
	  </li>
	  <li>
		htload
	  </li>
	</ul>
	<p>
	  It will also copy the htsearch program to your 
	  <code>--with-cgi-bin-dir=DIR</code> directory.
	</p>
	<p>
	  After this, several files will be customized and installed.
	  Here is a list of the files that get installed:
	</p>
	  <blockquote>
		<dl>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"><code>--with-config-dir=DIR</code></em>/htdig.conf
		  </dt>
		  <dd>
			A minimal config file which can be used to create a
			search database for http://www.htdig.org/
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"><code>--with-search-form=FILE</code></em>
		  </dt>
		  <dd>
			A sample HTML document that contains a search form.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-common-dir=DIR</code></em>/footer.html
		  </dt>
		  <dd>
			A sample HTML document that can be used as the search
			results footer.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-common-dir=DIR</code></em>/header.html
		  </dt>
		  <dd>
			A sample HTML document that can be used as the search
			results header.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-common-dir=DIR</code></em>/nomatch.html
		  </dt>
		  <dd>
			A sample HTML document that can be used if nothing was
			found.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-common-dir=DIR</code></em>/syntax.html
		  </dt>
		  <dd>
			A sample HTML document that will be displayed if the
			user entered an illegal boolean expression. found.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-common-dir=DIR</code></em>/english.0
		  </dt>
		  <dd>
			Default list of words with affixes that is used by
			htfuzzy.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-common-dir=DIR</code></em>/english.aff
		  </dt>
		  <dd>
			Default affix rule database that is used by htfuzzy.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-image-dir=DIR</code></em>/star.gif
		  </dt>
		  <dd>
			The default star image that is used to rank matches.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-image-dir=DIR</code></em>/star_blank.gif
		  </dt>
		  <dd>
			The default placeholder image that is the same size as
			the star, but is blank. This is used to align the
			results in the short listing.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-image-dir=DIR</code></em>/htdig.gif
		  </dt>
		  <dd>
			The nifty ht://Dig logo.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--with-image-dir=DIR</code></em>/button*.gif
		  </dt>
		  <dd>
			Sample images used to show the search result pages.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--bindir=DIR</code></em>/rundig
		  </dt>
		  <dd>
			A sample shell script which will create a database.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--prefix=DIR</code>/lib/htdig</em>/*.{a,so}
		  </dt>
		  <dd>
			The shared and static libraries.
		  </dd>
		  <dt>
			<em><img src="bdot.gif" width=9 height=9 alt="*"> <code>--prefix=DIR</code>/include/htdig</em>/*.h
		  </dt>
		  <dd>
			The header files that allow anyone to develop a program
			based on the internals of htdig.
		  </dd>
		</dl>
	  </blockquote>
	<p>
	  Note that these files will <em>never</em> replace any existing
	  files that may already be installed.
	</p>
	<p>
	  It is also important to note that these files are mostly
	  examples. As they stand, they will work, but you probably
	  want to modify them to reflect your needs.
	</p>
	<p>
	  After the installation, you will be ready to test out
	  everything. You can use the <code>rundig</code> script to make a
	  test database of the online documentation at
	  http://www.htdig.org/
	</p>
	<p>
	  The only thing left to do is to modify the <code>
	  htdig.conf</code> config file which was placed in <em>
	  <code>--with-config-dir=DIR</code></em>/htdig.conf. The <a href="attrs.html">
	  Configuration</a> manual has the details on how what
	  attributes are needed.
	  Then, you'll be ready to begin <a href="running.html">
	  running ht://Dig</a>.
	</p>
	<hr noshade>
	<h2>
	  <a name="sharelib">Shared Libraries</a>
	</h2>
	<p>
	  By default ht://Dig is compiled with shared libraries. If
	  running on a platform other than Linux or FreeBSD, this may
	  be a problem. We recommend that you compile with the 
	  <code>--disable-shared</code> configure option.
	</p>
	<p>
	  If you installed with shared libraries, you must be sure the
	  system will find them. Usually it's done by adding the 
	  prefix/lib/htdig directory to the LD_LIBRARY_PATH.
	  This is really system dependent and you must check your 
	  documentation.  
	</p>
	<hr noshade>
	<h2>
	<a name="OSs">Notes for particular operating systems</a>
	</h2>
	<p>
	<strong>Mac OS X</strong> cannot handle ht://Dig's shared libraries.
	    Use<br> <code>./configure --disable-shared --enable-static</code>.
	</p>
	<p>
	<strong>Solaris</strong> cc has problems with long file offsets.
	    Use<br> <code>./configure --disable-bigfile</code>.
	</p>
	<p>
	<strong>HP-UX 10.20</strong> does not handle ./configure.  Sorry.
	</p>
	<hr size="4" noshade>
	  <a href="author.html">Andrew Scherpbier &lt;andrew@contigo.com&gt; &amp; the ht://Dig Group</a>
	<br>
	Last modified: $Date: 2004/05/28 13:15:18 $

  </body>
</html>