UdmSearch Installation notes
============================

Requirements
============

SQL database requirements
-------------------------
Note that if you want to compile UdmSearch with one of supported
SQL database you must have database already installed before 
installing UdmSearch.

You also should have enough permissions to create new database
or to write into already existing one.

MySQL notes:
We tested UdmSearch with 3.22.x MySQL version, 3.21.xx may not work
with UdmSearch.

PostgreSQL notes:
If you want to build UdmSearch with PostgreSQL, release 6.5.x required,
which have LIMIT SQL clause. Note that Pg-6.5.3 crashes in "crc" and 
"crc-multi" mode.

iODBC notes:
iodbc-2.50.22a is known to work

unixODBC notes:
unixODBC-1.7 is known to work

Solid notes:
03.00.0043 version is known to work

InterBase notes:
4.0 version had been tested

Oracle8 notes:
8.0.5.X is known to work

Oracle8i notes:
8.1.6 R2 EE is known to work


Supported operating systems
===========================

We use GNU Autoconf so it is possible to compile and use UdmSearch on
almost every modern UNIX system with a C compiler without any modifications.
We develop the software on FreeBSD 3.x and Linux 2.2

Currently known systems UdmSearch has been successfully compiled and tested on 
are:

    * FreeBSD 2.2.5
    * FreeBSD 3.x
    * Linux 2.x
    * sun4u sparc SunOS 5.6
    * Solaris7 x86
    * BSDI 4.1
    * OpenBSD 2.5
    * HP-UX B.10.20 ( GNU "sed" required)
    * Digital Unix V4.0 (aka Compaq Tru64 UNIX)
    * SCO UnixWare 7.x
    * AIX 4.2

We hope UdmSearch will work on other Unix platforms as well. 
Please report successful platforms to devel@search.udm.net

Tools required for installation
===============================

You need the following tools to build and install UdmSearch from source:

   * GNU gunzip to uncompress the distribution.

   * A reasonable tar to unpack the distribution. GNU tar is known
     to work.

   * A working ANSI C compiler. GNU gcc is known to work.

   * A good make program. GNU make is always recommended and
     sometimes required.

Installing UdmSearch
====================

1. Unpack the distribution and change dir into the top-level directory 
of the unpacked distribution.

2a. Configure the pachage with built-in database support

	sh$ ./configure

2b. Configure the package with SQL database support

	sh$ ./configure --with-mysql
or
	sh$ ./configure --with-pgsql
or
	sh$ ./configure --with-msql

or with enother depending on what database do you prefer.

By default, the UdmSearch is installed in '/usr/local/udmsearch'
in the following subdirectories:

Directory        Contents

bin             search.cgi
sbin            indexer
etc             indexer.conf-dist, search.htm-dist
man             indexer.1, indexer.conf.5
doc		Various documentation
doc/samples	Configuration file samples

If you have no permissions to write to that directory or just want to install
UdmSearch to another location, please use configure with --prefix option.
You can see all available options with ./configure --help

It you want to provide some specific flags to C compiler (for example,
'-O7 -mpentium' to build highly optimized binary for Pentium processor
if you use egcs/pgcc), you can do so using command

	sh$  CFLAGS="-O7 -mpentium"
	
_before_ running configure.

To compile UdmSearch on FreeBSD with Solid in old aout format,
use

	sh$ CFLAGS="-aout"

before running configure.

To compile UdmSearch on FreeBSD with aout InterBase, use

	sh$ CFLAGS="-aout -static"

before running configure.

You may also specify --enable-freebsd-pthreads or --enable-linux-pthreads
to compile multi-threaded indexer on FreeBSD and Linux machines.


If you run into problems with configure, please see section
'Installation problems'.

3. Build and install the package.

	sh$ make
	sh$ make install

If you run into problems while doing make, please see section
'Installation problems'

4. Create database 'udmsearch' ( for SQL database only )

You can also use existing database, skip this step in this case.

MySQL:
	sh$ mysqladmin create udmsearch

PostgreSQL:
	sh$ createdb udmsearch

miniSQL:
	sh$ msqladmin create udmsearch

Use database specific documentation for other databases.


5. Create tables ( for SQL database only )

Change dir to 'create/your_database' directory of the distribution 
and create tables structure.

MySQL:
	sh$ mysql udmsearch < create.txt

PostgreSQL:
	sh$ psql udmsearch <create.txt

miniSQL:
	sh$ msql udmsearch <create.txt

Solid:
	sh$ solsql "tcp localhost 1313" dba dba create.txt


If you want to provide support for stop words, please do

	sh$ mysql udmsearch <stop.lang1.txt
	sh$ mysql udmsearch <stop.lang2.txt

for all languages that you are planning to support.

Stop-list is a list of common words (such as 'am','he','in' etc.)
that presents in almost every document, have little information value and
therefore should not be stored in database.

If there is no stop-list for your language in this distribution, you are
welcome to compose one and send it to devel@search.udm.net - it will be
included in next distribution.

If you want to make UdmSearch work in "multidict" mode, please
create all required tables using dicts.txt script.


6. Installing search scripts.

Copy search.cgi to your web-server cgi-bin directory or make Apache alias
to UdmSearch bin directory. 


Adding Ispell support
=====================
Ispell related stuff is described is /doc/ispell.txt


Installation problems
=====================

   * Each time you run 'configure', you must run 'make' again to
     recompile.

     To prevent old configuration information or object files from being
     used, run these commands before re-running 'configure':

             sh$ rm config.cache
             sh$ make clean

   * If your compile fails with make errors, this can be because
     you are using the wrong version of make.
     The behavior of Solaris, FreeBSD, OpenBSD make is slightly different 
     from GNU make. If you have make-related problems, 
     you should use GNU make instead, often installed as gmake.
     So, use gmake instead of make in step 3 after configure:

     GNU 'make' version 3.77 is known to work.

If above information doesn't help you, please feel free to contact UdmSearch
mailing list <udmsearch@search.udm.net> (please post in English only).