xref: /netbsd-src/external/bsd/unbound/dist/pythonmod/doc/install.rst (revision 53b02e147d4ed531c0d2a5ca9b3e8026ba3e99b5)
1Installation
2============
3
4Prerequisites
5-------------
6
7Python 2.4 or higher, SWIG 1.3 or higher, GNU make
8
9Download
10--------
11
12You can download the source codes `here`_.
13The latest release is 1.1.1, Jan 15, 2009.
14
15.. _here: unbound-1.1.1-py.tar.gz
16
17Compiling
18---------
19
20After downloading, you can compile the Unbound library by doing::
21
22    > tar -xzf unbound-1.1.1-py.tar.gz
23    > cd unbound-1.1.1
24    > ./configure --with-pythonmodule
25    > make
26
27You need GNU make to compile sources.
28SWIG and Python devel libraries to compile extension module.
29
30Testing
31-------
32
33If the compilation is successful, you can test the extension module by::
34
35    > cd pythonmod
36    > make sudo # or "make test" or "make suexec"
37
38This will start unbound server with language dictionary service
39(see :ref:`Tutorials`).
40In order to test this service, type::
41
42   > dig TXT @127.0.0.1 aught.en._dict_.cz
43
44Dig should print this message (czech equivalent of aught)::
45
46   ; <<>> DiG 9.5.0-P2 <<>> TXT @127.0.0.1 aught.en._dict_.cz
47   ; (1 server found)
48   ;; global options:  printcmd
49   ;; Got answer:
50   ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30085
51   ;; flags: aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
52
53   ;; QUESTION SECTION:
54   ;aught.en._dict_.cz.     IN  TXT
55
56   ;; ANSWER SECTION:
57   aught.en._dict_.cz.  300 IN  TXT "nic"
58
59   ;; Query time: 11 msec
60   ;; SERVER: 127.0.0.1#53(127.0.0.1)
61   ;; WHEN: Thu Jan 10 16:45:58 2009
62   ;; MSG SIZE  rcvd: 52
63
64The ``pythonmod/examples`` directory contains simple applications written in
65Python.
66