Compiling and installing lq-text on Unix

Overview

This document describes how to compile the lq-text text retrieval database package, and how to install it on your system.

What You will Need

You must be using the Unix operating system to do this installation. Most versions of Unix will do, inclusing SunOS, Solaris 2, HP/UX and Linux, for example.

If you are not experienced at porting C programs, you should not try to install lq-text on Digital Unix (OSF/1) or other 64-bit systems.

In order to complete the installation, you'll need:

  1. This documentation (!)
  2. The lq-text distribution, which you can download now: version 1.13; version 1.14 beta 6;
  3. The Berkeley db package; if you already have this on your system, you don't need to download it now. If you prefer, you can use ndbm(3) or sdbm instead; sdbm is included with the lq-text distribution.
  4. A C compiler, such as cc or the freely available gcc. If you don't have a C compiler, you won't be able to compile or install lq-text. The C compiler can be an ANSI-compatible one such as Sun's acc, or a K&R C compiler such as the SunOS cc.
  5. At least twenty megabytes of available disk space on the file system on which you are planning to compile lq-text.
  6. At least five megabytes of available disk space on the file system on which you are planning to install lq-text.

Duration

Once you are ready to start, and have all the pieces ready, the entire process should take between fifteen minutes and an hour.

Preparation

1. Unpack and install Berkeley db

If you have decided to use db, you should configure and install it now. See the instructions included with that package.

If instead you decided to use sdbm or ndbm, you can proceed directly to the next step.

Which package should I use?

2. Unpack the lq-text archive

gunzip < lq-text1.14.tgz | tar xvf -

3. Configure the lq-text software

First, go into the source directory:

cd lq-text1.14/src

Now, you have three files to edit:

  1. config.h
  2. port.h
  3. Makefile

Compiling lq-text

At this point you should be able to type

make

to the Unix shell and go away for a few minutes. If everything goes OK, you should see a message saying that the package has been compiled succesfully. If you get an error message and Make says Stop or Error instead, see the Troubleshooting Guide.

Now you are ready to test and then install lq-text.

Testing lq-text

A simple test suite is inlcuded, and you can run it like this:

make test

This may take a few minutes.

If there are no problems, you will see a message saying that the tests succeeded. If there were problems, see the Troubleshooting Guide.

Installing lq-text

You should first try a dry run, to make sure that the package is going to go where you expect:

make -n install

If this looks like it is going to do what you expect, you can install the pckage with

make install

This will copy files to the correct locations.

Finishing

You have now installed lq-text, and you are ready to start using it. You can try out a short tutorial, or go straight to the meat of the Reference Manual.