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