Site map  

Rob's search thingy Install

Download

Download source: websearch.tar.gz
Extract with 'tar xvfz websearch.tar.gz'.

Compilation

There is a simple Makefile. A 'make' does the following;

~$ make
cc -O2 -Wall -o cgi-index cgi-index.c
cc -O2 -Wall -o cgi-search cgi-search.c
cc -O2 -Wall -o fndtitle fndtitle.c
cc -O2 -Wall -o gen-num-index gen-num-index.c
cc -O2 -Wall -o gensynontab gensynontab.c
cc -O2 -Wall -o url2file url2file.c

If the compilation of cgi-search causes problems, see: custom.h.

Installation

A 'make install' will run the install script.
Do this as root;

~# make install

Files

Binaries and scripts are installed in '/usr/local/bin/'.
Man pages are installed in '/usr/local/share/man/man1/'.
Documentation is installed in '/usr/local/share/doc/websearch/'.
Searchform is installed in '/var/www/search/'.

If any of these directories do not exist, the install script will create them for you.
Files will only be copied if they do not already exist in the target directory or if the version in the target directory is older.

Directories

The following directories are created by the install script;

You need to set the ownership to these directories to the indexer process owner: If the indexer runs as user 'foo' group 'bar', set the following permissions;

~# cd /var/local/lib/
~# chmod g+w websearch
~# chown :bar websearch
~# cd websearch/
~# chown -R foo:bar *

Use

The software assumes that all HTML files have the '.html' extension. If this is not the case, you need to modify the shell scripts and C-sources, to include other extensions.

Run the scripts from a cron job. gen-text-files-list.sh after Linklint and before gen-cgi-index.sh
Don't run the indexer as root!
Don't run it as the webserver process owner either.