The K Desktop Environment

Next Previous Table of Contents

6. Mini-Howto: Installing a local DICT-server

6.1 Obtaining and installing dictd

At first we need to install the dictd daemon. The easiest way to install dictd is using a precompiled package. Such a package is included both in Debian and SuSE Linux. You can find packages that should work on all rpm-based Linux distributions on rpmfind.net.
If you want to compile dictd yourself, download ftp://ftp.dict.org/pub/dict/dictd-1.5.0.tar.gz. Compilation is easy, just unpack the archive and run "./configure", "make" and "make install" in the dictd-directory. You might want to use the --prefix flag off the configure-script, to install dictd in a different directory. By default dictd will be installed in /usr/local.

6.2 Obtaining databases

Now you need to download some databases. The standard set (webster, wordnet, jargon file, foldoc, ...) that is present on the DICT-server of dict.org, is available on ftp://ftp.dict.org/pub/dict/pre/. These are also available as Debian and rpm packages.

Additional preformatted databases: You can find more databases on the link page of www.dict.org, but the majority of them are not formatted for dictd.
Each database consists of two files: The ".index" file contains the index and the ".dict.dz" file the actual data. Unpack all packages into a directory of your choice, for example "/usr/share/dict/".

6.3 Configuration

You have to create/modify two configuration files. Both are stored in "/etc" (or in any other directory if you used the --prefix flag).
"dict.conf" belongs to the basic dict(1) client. It has only one line: "server localhost", this tells dict(1) to use the local server.
"dictd.conf" configures the server. First you must add the access-statement:
    access {allow localhost deny *}
This example grants only local access and blocks all external connections. You can use more than one allow and deny rule, for example:
    access {allow localhost allow *.workgroup deny *}
The database-statement configures the location of the index- and the data-file for a database:
    database web1913   { data "/usr/share/dict/web1913.dict.dz"
                         index "/usr/share/dict/web1913.index" }  
You must add a statement for each database you want to use.

Now you should be able to start dictd and to use it with dict(1) and Kdict.
Please consult the man page of dictd for a complete description of "dictd.conf".

6.4 Starting dictd automatically

If you want to use the dict server frequently, you might want to start it automatically during the startup process of your system. Some of the precomplied packages install a suitable script, but you can also adapt the generic SYSV-style script included in the source distribution: ftp://ftp.dict.org/pub/dict/INITSCRIPT.

Next Previous Table of Contents