2014-10-05 15:44:31 -06:00
|
|
|
Installation
|
2017-06-16 04:16:05 -06:00
|
|
|
============
|
2014-10-05 15:44:31 -06:00
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
Prerequisites
|
|
|
|
-------------
|
2014-10-05 15:44:31 -06:00
|
|
|
|
|
|
|
Python 2.4 or higher, SWIG 1.3 or higher, GNU make
|
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
Download
|
|
|
|
--------
|
2014-10-05 15:44:31 -06:00
|
|
|
|
|
|
|
You can download the source codes `here`_.
|
|
|
|
The latest release is 1.1.1, Jan 15, 2009.
|
|
|
|
|
|
|
|
.. _here: unbound-1.1.1-py.tar.gz
|
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
Compiling
|
|
|
|
---------
|
2014-10-05 15:44:31 -06:00
|
|
|
|
|
|
|
After downloading, you can compile the Unbound library by doing::
|
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
> tar -xzf unbound-1.1.1-py.tar.gz
|
|
|
|
> cd unbound-1.1.1
|
|
|
|
> ./configure --with-pythonmodule
|
|
|
|
> make
|
2014-10-05 15:44:31 -06:00
|
|
|
|
|
|
|
You need GNU make to compile sources.
|
|
|
|
SWIG and Python devel libraries to compile extension module.
|
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
Testing
|
|
|
|
-------
|
2014-10-05 15:44:31 -06:00
|
|
|
|
|
|
|
If the compilation is successful, you can test the extension module by::
|
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
> cd pythonmod
|
|
|
|
> make sudo # or "make test" or "make suexec"
|
2014-10-05 15:44:31 -06:00
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
This will start unbound server with language dictionary service
|
|
|
|
(see :ref:`Tutorials`).
|
2014-10-05 15:44:31 -06:00
|
|
|
In order to test this service, type::
|
2017-06-16 04:16:05 -06:00
|
|
|
|
2014-10-05 15:44:31 -06:00
|
|
|
> dig TXT @127.0.0.1 aught.en._dict_.cz
|
|
|
|
|
|
|
|
Dig should print this message (czech equivalent of aught)::
|
|
|
|
|
|
|
|
; <<>> DiG 9.5.0-P2 <<>> TXT @127.0.0.1 aught.en._dict_.cz
|
|
|
|
; (1 server found)
|
|
|
|
;; global options: printcmd
|
|
|
|
;; Got answer:
|
|
|
|
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30085
|
|
|
|
;; flags: aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
|
2017-06-16 04:16:05 -06:00
|
|
|
|
2014-10-05 15:44:31 -06:00
|
|
|
;; QUESTION SECTION:
|
2017-06-16 04:16:05 -06:00
|
|
|
;aught.en._dict_.cz. IN TXT
|
|
|
|
|
2014-10-05 15:44:31 -06:00
|
|
|
;; ANSWER SECTION:
|
2017-06-16 04:16:05 -06:00
|
|
|
aught.en._dict_.cz. 300 IN TXT "nic"
|
|
|
|
|
2014-10-05 15:44:31 -06:00
|
|
|
;; Query time: 11 msec
|
|
|
|
;; SERVER: 127.0.0.1#53(127.0.0.1)
|
|
|
|
;; WHEN: Thu Jan 10 16:45:58 2009
|
|
|
|
;; MSG SIZE rcvd: 52
|
|
|
|
|
2017-06-16 04:16:05 -06:00
|
|
|
The ``pythonmod/examples`` directory contains simple applications written in
|
|
|
|
Python.
|