2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 18:08:16 +00:00
kea/doc/sphinx/arm/quickstart.rst

193 lines
5.2 KiB
ReStructuredText
Raw Normal View History

.. _quickstart:
***********
Quick Start
***********
This section describes the basic steps needed to get Kea up and running.
For further details, full customizations, and troubleshooting, see the
respective chapters elsewhere in this Kea Administrator Reference Manual (ARM).
2020-03-20 17:53:08 +01:00
.. _quick-start-tarball:
2021-09-09 15:28:58 +00:00
Quick Start Guide Using tarball
2020-11-20 16:54:00 +02:00
===============================
1. Install required runtime and build dependencies. See
:ref:`build-requirements` for details.
2. Download the Kea source tarball from the `ISC.org downloads
2021-09-09 15:28:58 +00:00
page <https://www.isc.org/download/>`__ or the `ISC downloads site
2020-03-20 17:53:08 +01:00
<https://downloads.isc.org/isc/kea/>`__.
3. Extract the tarball. For example:
.. parsed-literal::
$ tar -xvzf kea-|release|.tar.gz
4. Go into the source directory and run the configure script:
.. parsed-literal::
$ cd kea-|release|
$ ./configure [your extra parameters]
5. Build it:
.. code-block:: console
$ make
2021-09-09 15:28:58 +00:00
6. Install it (by default it will be placed in ``/usr/local/``, so
root privileges are likely required for this step):
.. code-block:: console
2020-03-20 17:53:08 +01:00
$ make install
.. _quick-start-repo:
2021-09-09 15:28:58 +00:00
Quick Start Guide Using Native Packages
2020-03-20 17:53:08 +01:00
=======================================
2021-09-09 15:28:58 +00:00
As of Kea 1.6.0, ISC provides native RPM, deb, and APK
packages, which make Kea installation much easier. Unless
specific compilation options are desired, it is usually easier to install
2020-03-20 17:53:08 +01:00
Kea using native packages.
2021-09-09 15:28:58 +00:00
1. Go to `Kea on cloudsmith.io <https://cloudsmith.io/~isc/repos/>`__,
choose the Kea version, and enter the repository.
2020-03-20 17:53:08 +01:00
2. Use ``Set Me Up`` and follow instructions to add the repository
2021-09-09 15:28:58 +00:00
to the local system.
2020-03-20 17:53:08 +01:00
3. Update system repositories. For example:
.. code-block:: console
$ apt-get update
2021-09-09 15:28:58 +00:00
4. Kea is split into various packages. The entire list is available on
2020-11-20 16:54:00 +02:00
`cloudsmith.io <https://cloudsmith.io/~isc/repos/>`__ or using apt/yum/dnf.
For example:
2020-03-20 17:53:08 +01:00
.. code-block:: console
$ apt-cache search isc-kea
2021-09-09 15:28:58 +00:00
5. Install specific packages:
2020-03-20 17:53:08 +01:00
.. code-block:: console
2020-04-24 12:24:21 +02:00
$ sudo apt-get install isc-kea-dhcp6-server
2020-03-20 17:53:08 +01:00
or all packages:
2020-03-20 17:53:08 +01:00
.. code-block:: console
$ sudo apt-get install isc-kea*
2021-09-09 15:28:58 +00:00
or all packages with a specified version number:
2020-03-20 17:53:08 +01:00
.. code-block:: console
2020-11-20 16:54:00 +02:00
$ sudo apt-get install isc-kea*=1.8.1-isc0000920201106154401
2020-03-20 17:53:08 +01:00
2021-09-09 15:28:58 +00:00
6. All installed packages should be now available directly; for example:
2020-03-20 17:53:08 +01:00
.. code-block:: console
# kea-dhcp6 -c /path/to/your/kea6/config/file.json
or using systemd:
.. code-block:: console
# systemctl restart isc-kea-dhcp6-server
2020-11-20 16:54:00 +02:00
``keactrl`` is not available in packages as similar functionality is provided
by the native systemctl scripts.
2020-03-20 17:53:08 +01:00
.. _quick-start-services:
Quick Start Guide for DHCPv4 and DHCPv6 Services
================================================
2021-09-09 15:28:58 +00:00
1. Edit the Kea configuration files, which by default are installed in
the ``[kea-install-dir]/etc/kea/`` directory. These are:
``kea-dhcp4.conf``, ``kea-dhcp6.conf``, ``kea-dhcp-ddns.conf`` and
2020-11-20 16:54:00 +02:00
``kea-ctrl-agent.conf``, ``keactrl.conf`` for DHCPv4 server, DHCPv6 server,
2021-09-09 15:28:58 +00:00
D2, Control Agent, and the keactrl script, respectively.
2021-09-09 15:28:58 +00:00
2. To start the DHCPv4 server in the background, run the
following command (as root):
.. code-block:: console
# keactrl start -s dhcp4
2021-09-09 15:28:58 +00:00
Or run the following command to start the DHCPv6 server:
.. code-block:: console
# keactrl start -s dhcp6
Note that it is also possible to start all servers simultaneously:
.. code-block:: console
# keactrl start
2020-03-20 17:53:08 +01:00
3. Verify that the Kea server(s) is/are running:
.. code-block:: console
# keactrl status
A server status of "inactive" may indicate a configuration error.
Please check the log file (by default named
``[kea-install-dir]/var/log/kea-dhcp4.log``,
``[kea-install-dir]/var/log/kea-dhcp6.log``,
2021-09-09 15:28:58 +00:00
``[kea-install-dir]/var/log/kea-ddns.log``, or
``[kea-install-dir]/var/log/kea-ctrl-agent.log``) for the details of
2021-09-09 15:28:58 +00:00
any errors.
2021-09-09 15:28:58 +00:00
4. If the server has started successfully, test that it is
responding to DHCP queries and that the client receives a
configuration from the server; for example, use the `ISC DHCP
client <https://www.isc.org/download/>`__.
2021-09-09 15:28:58 +00:00
5. To stop running the server(s):
.. code-block:: console
# keactrl stop
2021-09-09 15:28:58 +00:00
For system-specific instructions, please read the
`system-specific notes <https://kb.isc.org/docs/installing-kea>`__,
available in the Kea section of `ISC's
Knowledgebase <https://kb.isc.org/docs>`__.
2020-04-24 12:24:21 +02:00
The details of ``keactrl`` script usage can be found in :ref:`keactrl`.
2021-09-09 15:28:58 +00:00
Once Kea services are up and running, consider deploying a dashboard solution
to monitor running services. For more details, see :ref:`stork`.
2020-04-24 12:24:56 +02:00
.. _quick-start-direct-run:
Running the Kea Servers Directly
================================
The Kea servers can be started directly, without the need to use
``keactrl`` or ``systemctl``. To start the DHCPv4 server run the following command:
.. code-block:: console
# kea-dhcp4 -c /path/to/your/kea4/config/file.json
2021-09-09 15:28:58 +00:00
Similarly, to start the DHCPv6 server, run the following command:
.. code-block:: console
# kea-dhcp6 -c /path/to/your/kea6/config/file.json