Mini-Howto: Installing a local DICT server

Obtaining and installing dictd
At first the dictd daemon has to be installed. The easiest way to install dictd is using a precompiled package. Such a package is included both in Debian and SuSE . You can find packages that should work on all RPM based distributions on rpmfind.net.
If you want to compile dictd yourself, download ftp://ftp.dict.org/pub/dict/dictd-1.5.5.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 option of the configure script to install dictd in a different directory. By default dictd will be installed in /usr/local.

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 from ftp://ftp.dict.org/pub/dict/pre/. These are also available as Debian and rpm packages.

Additional preformatted databases
www.freedict.de 	Translating dictionaries for Africaans, Czech, Danish, English, French, German, Greek, Hungarian, Irish, Italian, Japanese, Latin, Nederlands (Dutch), Portuguese, Russian, Serbo-Croatian, Swedish, Slovak, Spanish, Swahili, Swedish, Turkish and Welsh
http://www.wh9.tu-dresden.de/~heinrich/dict/ 	Translating dictionaries for English, French, German, Italian, Latin, Portugue and Spanish.
http://purl.oclc.org/NET/voko/revodict.tgz 	Esperanto dictionary
http://www.bainsware.com/obi-bio/ 	OBI's Online Biographical Dictionary
http://www.bainsware.com/inaug/ 	The Inaugural Addresses of all the US presidents
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/.

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 client. It contains only one line: server localhost. This tells dict 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 and .
Please consult the man page of dictd for a complete description of dictd.conf.

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.