ht://Dig

Get htdig

Web to the ht://Dig home page.

cd /usr/src
gunzip htdig-3.2.0b3.tar.gz
tar xf htdig-3.2.0b3.tar
rm htdig-3.2.0b3.tar
cd htdig-3.2.0b3

Build and install htdig

Read the local install web page in /usr/src/htdig-3.2.0b3/htdoc/install.html or the other local web page /usr/src/htdig-3.2.0b3/htdoc/index.html. Once it's installed, change the owner of the database directory so that siemsen can index things.

cd /usr/src/htdig-3.2.0b3
./configure
make
make install
make clean
chown -R siemsen.users /opt/www/var

Test htdig

Ok, now it's installed. You can test it by running rundig. It's in the installdir directory. It won't run until you edit it and change @BIN_DIR@ to /opt/www/bin. Then run it with ./installdir -vv.

(as siemsen)
cd ~/tmp
cp /usr/src/htdig-3.2.0b3/installdir/rundig .
emacs rundig
COMMONDIR=/opt/www/share/htdig/synonyms
BINDIR=/opt/www/bin

./rundig -vvv

This does a bunch of web accesses and then creates htdig databases in /opt/www/var/htdig.

Configure htdig

Next, configure htdig. This basically tells htdig what web site to index, what files to ignore, what web sites to follow links to, who should be emailed if something fails, etc. See the /usr/src/htdig-3.2.0b3/htdoc/config.html file for details. Edit /opt/www/conf/htdig.conf.

start_url: http://proteus.ucar.edu/nets/intro/staff/siemseny
maintainer: siemsen@ucar.edu
exclude_urls: /cgi-bin/ .cgi /web100 /test /nets.old \
/webmaker3.0.2 distfile /CSCOpx /perldoc \
/net/archives
bad_extensions:.wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \
.jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg \
.mov .avi .pl .bmp

Index the local web

Then I read the How it works web page. This explains that you first run htdig to build the index files. See the local htdig doc file at /usr/src/htdig-3.2.0b3/htdoc/htdig.html.

(as siemsen)
htdig (takes a LONG time)
htmerge

This will build index files in /opt/www/var/htdig.

Set up the search form

To use it, you have to put a search form on a web page. An example form is in /usr/src/htdig-3.2.0b3/installdir/search.html. Copy it into your web page.

The form executes htsearch, so htsearch has to be in cgi directory known to the web server.

(as root)
cp /opt/www/cgi-bin/htsearch /usr/local/apache2/cgi-bin/

Customize the output

To customize the look of search output pages, see the htsearch templates web page.
Pete Siemsen
Last modified: Sat Nov 15 22:55:42 MST 2003