mnoGoSearch Installation notes
==============================

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

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

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

MySQL notes:
We tested mnoGoSearch with 3.22.x, 3.23.x MySQL version, 3.21.xx will not
work with mnoGoSearch.

PostgreSQL notes:
If you want to build mnoGoSearch with PostgreSQL, more than 6.5.x release
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 mnoGoSearch 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 mnoGoSearch has been successfully compiled and tested on 
are:

    * FreeBSD 2.2.5
    * FreeBSD 3.x
    * FreeBSD 4.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
    * SGI Irix 6.5
    * YellowDog Linux for PPC on Mac G3
    * MacOSX 10.0.0

We hope mnoGoSearch will work on other Unix platforms as well. 
Please report successful platforms to devel@mnogosearch.org

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

You need the following tools to build and install mnoGoSearch 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 mnoGoSearch
======================

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

	tar -zxf mnogosearch-x.x.x.tar.gz

2. To simplify configuration process we included a configuration script with the package - install.pl
Run install.pl and select mnoGoSearch configuration options in a question-and-answer manner. After you 
specify all the configuration options, the script will run ./configure with the options you chose. It 
will also create install.options file containing your configuration preferences that you can use to run 
the script later bypassing questions. After configuration is finished, build and install the package as 
described in section 3.


2a. In case you would like to configure mnoGoSearch manually without using the configuration script, 
do the following:

Configure the package with built-in database support

	sh$ ./configure --with-built-in

 
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 you prefer.

By default, mnoGoSearch is installed in '/usr/local/mnogosearch'
in the following subdirectories:

Directory        Contents

bin             search.cgi
lib             libudmsearch.a(so)
sbin            indexer
etc             indexer.conf-dist, search.htm-dist
man             indexer.1, indexer.conf.5
doc		Various documentation

If you have no permissions to write to that directory or just want to install
mnoGoSearch to another location, please use configure with --prefix option, e.g.

	./configure --prefix=/user/home/mnogo --with-built-in 

or with mysql database support:	
	
	./configure --prefix=/user/home/mnogo --with-mysql	


To install mnoGoSearch with HTTPS support, use configure with the following option:

	./configure --with-openssl
	
or in case the OpenSSL library is installed in a non-standard location:
	
	./configure --with-openssl=/path/to/library
	
Please note that you need OpenSSL library installed on your system.

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 mnoGoSearch on FreeBSD with Solid in old aout format,
use

	sh$ CFLAGS="-aout"

before running configure.

To compile mnoGoSearch 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.

To enamble DMALLOC memory debugger support use --enable-dmalloc. 

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 'mnogosearch' ( for SQL database only )

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

MySQL:
	sh$ mysqladmin create mnoGoSearch

PostgreSQL:
	sh$ createdb mnogosearch

miniSQL:
	sh$ msqladmin create mnogosearch

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 mnogosearch < create.txt

PostgreSQL:
	sh$ psql mnogosearch <create.txt

miniSQL:
	sh$ msql mnogosearch <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 mnogosearch <stop.lang1.txt
	sh$ mysql mnogosearch <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 general@mnogosearch.org - it will be
included in next distribution.

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


6. Installing search scripts.

Copy search.cgi to your web-server cgi-bin directory or make Apache alias
to mnoGoSearch 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 mnoGoSearch
mailing list <general@mnogosearch.org> (please post in English only).
