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