Skip to content

Commit

Permalink
framework for installation update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Carpay committed Jul 7, 2021
1 parent ef8a9a8 commit 1f67a6a
Showing 1 changed file with 68 additions and 4 deletions.
72 changes: 68 additions & 4 deletions source/getting-started/installation.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,75 @@
Installation
============

Compiling
---------
To install your own copy of Unbound you have two options: Using the version provided by your package manager, or downloading the source and building it yourself.

Installing via the package manager is the easiest option, and on most systems even trivial. The downside is the distributed version can be outdated for some systems or not have all the compile-time options included that you want.
Building and compiling Unbound yourself ensures that you have the latest version and all the compile-time options you want.


.. Link to Compiling, Setup and Remote Control Setup (page index?)
Building from source/Compiling
------------------------------

To compile Unbound on any system you need to have ``openssl`` and ``expat``, and their header files. To include the header files we need the development version, usually called ``libssl-dev`` and ``libexpat1-dev`` respectively.

Ubuntu 20.04.1 LTS
------------------

First of all, we need our copy of the Unbound code, so we download the tarball of the latest version and untar it.

.. code-block:: bash
wget https://nlnetlabs.nl/downloads/unbound/unbound-latest.tar.gz
tar xzf unbound-latest.tar.gz
We'll need some tools, such as a compiler and the ``make`` program.
.. code-block:: bash
sudo apt update
sudo apt install -y build-essential
The library components Unbounds needs are: ``libssl`` ``libexpat``, of which we need the "dev" version. Unbound also uses ``libldns``, but this is included in the tarball.

.. code-block:: bash
sudo apt install -y libssl-dev
sudo apt install -y libexpat1-dev
We'll also need the tools to build the actual program. For this, Unbound uses "make" and internally it uses "flex" and "yacc", which we need to download as well.

.. code-block:: bash
sudo apt-get install -y bison flex
With all the requirements met, we can now start compiling in the Unbound directory. The first step here is configuring. With :option:`./configure -h` you can look at the extensive list of configurables for Unbound. A nice feature is that ``./configure`` will tell you what it's missing. A common error is for the paths to the two libraries we just installed, which can be specified with :option:`--with-ssl=` and :option:`--with-libexpat=`).

.. code-block:: bash
./configure
When :command`configure` gives no errors, we can continue to actually compiling. For this Unbound uses :command`make`. Be warned that compiling might take a while

.. code-block:: bash
make
When we have a succesful compilation, we can install the programs to have them available for the entire machine.

.. code-block:: bash
sudo make install
We now have fully compiled and installed version of Unbound, and can now move to configuring it.









If your distribution package manager has a package for unbound you can
skip this step, just install the package with your package manager.

To compile the software you need to have ``openssl``, and its include files
(from a package often called ``openssl-devel``).
Expand Down

0 comments on commit 1f67a6a

Please sign in to comment.