I'm trying to get htdig working on a Solaris 2.7 system with the Sun C
compiler.  Here's the notes I kept as to what I did to get where I am.

I can now go to my local search.html Web page, and enter a word, but
no matter what word I try, I always get no hits.  Any suggestions are
welcome.


1.35.1  Get htdig

To get it, web to http://www.interweft.com.au/other/htdig/where.html
and click on the htdig-3.0.6.tar.gz link.

   gunzip htdig-3.0.6.tar.gz
   tar xf htdig-3.0.6.tar
   rm htdig-3.0.6.tar
   cd /usr/web
   mkdir htdoc
   cd htdoc
   cp /usr/src/htdig-3.0.6/htdoc/* .
   cd ..
   chown -R siemsen htdoc
   chgrp -R datacomm htdoc

1.35.2  Build htdig

   cd /usr/src/htdig-3.0.6

Use a web browser to look at /usr/web/htdoc. Under Installation,
you'll find a page that describes editing of the CONFIG file. I set
values in this file as follows:

   DEST= /opt/htdig
   CGIBIN_DIR= /usr/web/nets/cgi
   IMAGE_DIR= /usr/web/nets/images
   IMAGE_URL_PREFIX= /nets/images
   SEARCH_DIR= /usr/web/nets/Forms

Now configure it:

   ./configure

The next step is to run "make".  If you do, you'll get compiler
warnings, and then a compile failure.  To get past the failure, I
hacked the source files.  Scary, but I didn't know what to do.  I
tried copying the distribution to another system that has GCC and
doing a "configure" and "make" there.  On that system, I got even more
warnings, and then it failed on the same source file.  So...


Edit htfuzzy/Exact.c and add

   return 0;

as the body of the openIndex function.

Edit htdig/Document.cc and change

   typedef void (*SIGNAL_HANDLER) (...);

to

   typedef void (*SIGNAL_HANDLER) (int);

Edit htdig/SGMLEntities.cc and change

   return (unsigned char) (*junk.trans)[entity];

to

   return (int) (*junk.trans)[entity];

Edit htdig/Makefile and change

   $(TARGET): $(OBJS)
   $(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)

to

   $(TARGET): $(OBJS)
   $(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS) -lsocket -lnsl -lxnet

1.35.3  Build and install htdig

   cd /usr/src/htdig-3.0.6
   make
   make install
   chown -R siemsen db
   chgrp -R datacomm db

1.35.5  Configure htdig

A file named /opt/htdig/conf/htdig.conf controls the operation of the
indexer. Edit it to reflect our web:

   start_url: http://netserver.ucar.edu/
   exclude_urls: /nets/cgi/ .cgi

1.35.6  Make a Web page to test searching

The make install copied an HTML file named search.html into
/usr/web/nets/Forms. The file is screwed up ina few ways.  For one, it
contains these lines:

   <input type=hidden name=config value=$(CONFIG)>
   <input type=hidden name=restrict value="$(RESTRICT)">
   <input type=hidden name=exclude value="$(EXCLUDE)">

...which seem wrong.  When the Web server starts htsearch, htsearch
produces the error

   Unable to read configuration file "/opt/htdig/conf/$(CONFIG).conf"

After tearing my hair for a while, I discovered that there was a
version of search.html in .../installdir/search.html.orig that seemed
more correct.  Instead of the above three lines, is had just

   <input type=hidden name=config value=htdig>

So:

   cp /usr/src/htdig-3.0.6/installdir/search.html.orig /usr/web/nets/Forms

Edit /usr/web/nets/Forms/search.html.

Change the header sentence to

   This page allows you to search the contents of the NETS Web pages.

Change

   <form method="post" action="/cgi-bin/htsearch">

to

   <form method="post" action="/nets/cgi/htsearch">


1.35.7  Build the htdig index

   /opt/htdig/bin/rundig -v

1.35.8  Test a search

Start a web browser, and go to this URL:

   http://netserver.ucar.edu/nets/Forms/search.html



This "works", except that it always says there are no hits.

Please help.  HTDIG looks like a neat tool, and I think I'm very close
to making it work.

-- Pete
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.

Reply via email to