2.4. Installing DataparkSearch

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

    tar -xyf dpsearch-x.x.tar.bz2

  2. To simplify configuration process we included a configuration script with the package - install.pl. Run install.pl and select DataparkSearch 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.

    In case you would like to configure DataparkSearch manually without using the configuration script, do the following:

    If you would like to configure the package with SQL database support:

    sh$ ./configure --with-mysql

    or

    sh$ ./configure --with-pgsql

    or with another depending on what database you prefer,

    or with multiple databases:

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

    By default, DataparkSearch is installed in /usr/local/dpsearch in the following subdirectories:

    DirectoryContents
    bin search.cgi, storedoc.cgi, dps-config
    lib libdpsearch.a(so), libdpcharset.a(so)
    sbin indexer, cached, run-splitter, searchd, splitter, stored
    etc indexer.conf-dist, search.htm-dist, langmap.conf-dist, searchd.conf-dist, stopwords.conf-dist, stored.conf-dist, storedoc.htm-dist
    sharevarious documentation and sql scripts

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

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

    To install DataparkSearch 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

    Note: Please note that OpenSSL library installed on your system is required for HTTPS support.

    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

    sh$ CFLAGS="-O7 -mpentium"

    before running configure.

    To compile DataparkSearch on FreeBSD with Solid in old aout format use

    sh$ CFLAGS="-aout"

    before running configure.

    To compile DataparkSearch 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 enable DMALLOC memory debugger support use --enable-dmalloc.

    The euc-kr, big5, gb2312, tscii, gujarati and shift-jis character sets are not supported by default. To built DataparkSearch with these charsets support use configure with --with-extra-charsets command line argument.

    To build DataparkSearch with all additional charsets support use:

    ./configure --with-extra-charsets=all

    To build DataparkSearch with only one specified charset support use:

    ./configure --with-extra-charsets=tscii

    To build DataparkSearch with support for Chinese or Japanese charsets, use:

    ./configure --with-extra-charsets=japanese or ./configure --with-extra-charsets=chinese

    To build DataparkSearch with support for several specified charsets, use a comma separated list of charsets you want:

    ./configure --with-extra-charset=japanese,tscii

    If you run into problems with configure, please see Section 2.5>.

  3. Build and install the package.

    sh$ make

    sh$ make install

    If you run into problems with configure, please see Section 2.5>.

  4. Create database search (for SQL database only).

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

    MySQL:

    sh$ mysqladmin create search

    PostgreSQL:

    sh$ createdb search

    See database specific information if you use another database.

  5. Create configuration files.

    Copy indexer.conf-dist to indexer.conf and search.htm-dist to search.htm in the configuration directory (by default this directory is /usr/local/dpsearch/etc/). Then edit indexer.conf and search.htm according your needs. Basically your only have to edit DBAddr command in both of these files specifying a connection to SQL-server and desired dbmode.

  6. Create sql-tables

    Run the command:

    sh$ indexer -Ecreate

    indexer creates all tables automatically according to the dbmode selected in your indexer.conf file.

  7. Install search scripts

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