]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/pythonmod/doc/install.rst
network_cmds-596.100.2.tar.gz
[apple/network_cmds.git] / unbound / pythonmod / doc / install.rst
1 Installation
2 ===================================
3
4 **Prerequisites**
5
6 Python 2.4 or higher, SWIG 1.3 or higher, GNU make
7
8 **Download**
9
10 You can download the source codes `here`_.
11 The latest release is 1.1.1, Jan 15, 2009.
12
13 .. _here: unbound-1.1.1-py.tar.gz
14
15 **Compiling**
16
17 After 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
24 You need GNU make to compile sources.
25 SWIG and Python devel libraries to compile extension module.
26
27 **Testing**
28
29 If 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
34 This will start unbound server with language dictionary service (see :ref:`Tutorials`).
35 In order to test this service, type::
36
37 > dig TXT @127.0.0.1 aught.en._dict_.cz
38
39 Dig 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
59 The ``pythonmod/examples`` directory contains simple applications written in Python.