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

Quick source installation tips
------------------------------
tar -zxf mnogosearch-x.x.x.tar.gz
cd mnogosearch-x.x.x
./configure --prefix=/usr/local/mnogosearch --with-mysql
make
make install
cd /usr/local/mnogosearch/etc/
cp indexer.conf-dist indexer.conf
cp search.htm-dist search.htm
vi indexer.conf
vi search.htm
/usr/local/mnogosearch/sbin/indexer --create


Supported operating systems
---------------------------
We use GNU Autoconf so it should be possible to compile mnoGoSearch
on all modern Linux/Unix systems with a C compiler.

The full list of the operating systems mnoGoSearch is known to work on
can be found in the online manual at:
http://www.mnogosearch.org/doc33/msearch-opsys.html

Please report successful platforms to general@mnogosearch.org


SQL database requirements
-------------------------
mnoGoSearch uses an SQL database to store its data. You need one
of the supported SQL databases to be installed on your system before
installing mnoGoSearch. See our online manual for the list of the
supported databases:
http://www.mnogosearch.org/doc33/msearch-install.html

You will also need enough permissions to create a new database 
or to create tables in an existing database.

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 recommended.

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
  cd mnogosearch-x.x.x

2a. 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.

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

Configure the package with some SQL database:

  $ ./configure --with-mysql
or
  $ ./configure --with-pgsql
or
  $ ./configure --with-sqlite3

or with another supported database depending on your choice,

or with multiple databases:

  $ ./configure --with-mysql --with-pgsql --with-freetds


By default, mnoGoSearch is installed into '/usr/local/mnogosearch'.
If you have no permissions to write to this directory or want to install
mnoGoSearch to another location, use configure with the --prefix option,
e.g.:

  ./configure --prefix=/home/user/mnogosearch --with-mysql

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

  ./configure --with-openssl --with-mysql

or in case the OpenSSL library is installed in a non-standard location:
	
	./configure --with-openssl=/path/to/library --with-mysql

Please note that you need OpenSSL library installed on your system.

You can see all available options with ./configure --help


If 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

  $ export CFLAGS="-O7 -mpentium"

before running configure.


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

3. Build and install the package.

  $ make
  $ make install

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

4. Create a new database

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

MySQL:
  $ mysqladmin create mnogosearch

PostgreSQL:
  $ createdb mnogosearch


Use database specific documentation for the other databases.


5. Create indexer.conf and search.htm:
Change directory to /usr/local/mnogosearch/etc/,
copy indexer.conf-dist into indexer.conf,
copy search.htm-dist into search.htm,
edit indexer.conf and search.htm in your favorite text editor.
Setting DBAddr is the most important at this step, e.g:

  DBAddr mysql://root@localhost/mnogosearch/


5. Create tables:

Change directory to '/usr/local/mnogosearch/sbin/' and run:

  ./indexer --create


6. Installing search Web front-end.

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


Installation problems
---------------------

  * Every time you run 'configure', you must run 'make' again to rebuild.

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

    $ rm config.cache
    $ make clean

  * If compilation fails with ``make'' errors, it can happen because
    of a wrong make program being used.
    The behavior of Solaris, FreeBSD, OpenBSD ``make'' is slightly different 
    from GNU make. If you have make-related problems, 
    you should try using GNU make instead (or ``gmake'' on some platforms).

If above information doesn't help, feel free to write to the mnoGoSearch
mailing list <general@mnogosearch.org> (please post in English only).


Creating binary distribution
----------------------------

You can create a binary distribution for your platform and share
it with us. We'll put binaries for various platforms to our site
to make them available to the other users. To create a binary distribution,
please type "make bin-dist", then put a newly created tar.gz somewhere on the 
Internet and post a link to it to general@mnogosearch.org
Thanks.

