• Print
  • Share
  • Dark
    Light

Kea build on CentOS & RedHat

  • Updated on 17 Jan 2019
  • 2 minutes to read
  • Contributors

CentOS/RedHat System-Specific Install Notes

Updated on 14-December-2018

This page documents Kea 1.5 installation on CentOS and RedHat version 7. Unfortunately, rpm install is not available for any current version of Kea.

While these instructions were thoroughly tested with Kea 1.5 at release time, if you are using the sysrepo/netconf or RADIUS integration with Kea, you might also wish to consult the Kea GitLab wiki pages, where we keep a running list of updates, changes and hints. These two integrations have additional dependencies on other open source components that may change more frequently than our Kea releases.

Installing from Source (without sysrepo/netconf)

Kea versions 1.4.0 and newer depends on one package that needs a newer compiler than is available in the base CentOS release. For this reason, it is necessary to install the GCC 7 toolchain.

There are TWO scripts that need to be run to install Kea from source - the first sets up the environment and the second installs the Boost library and Kea itself.

Script 1:

# install all pre-built/native dependencies
sudo yum -y install cmake bison flex pcre-devel libev-devel protobuf-c-devel protobuf-c-compiler make rpm-build doxygen swig
sudo yum -y install autoconf automake libtool gtest-devel
sudo yum -y install openssl-devel

# If you don't already have git installed, it may be needed to fetch the source
sudo yum -y install git
# We also need to grab some packages via wget
sudo yum -y install wget

# Now, add the community tools
sudo yum -y install epel-release

# This one comes from EPEL, so it has to be listed after...
sudo yum -y install log4cplus-devel

# Speed things up a bit (also in EPEL)
sudo yum -y install ccache

# Mocka is not needed (it's used for unit-tests for sysrepo)
# sudo yum -y install libcmocka-devel

# As-of Kea 1.5, we can get away with boost-devel and not a specific version
sudo yum -y install boost-devel

# Allow environment modification
sudo yum -y install centos-release-scl

# This installs gcc 7. The standard gcc available in CentOS (4.8.5) is too old to compile
# some of the dependencies (libyang requires at the very least a 4.9).
sudo yum -y install devtoolset-7-gcc*

# enter devtools environment, this sets path to GCC 7, etc
# Note: This command starts bash with paths set to use gcc7. Once you close that
# shell, your environment will revert back to the standard tools (GCC 4.8.5).
scl enable devtoolset-7 bash

Script 2:

# 
wget -nd https://ftp.isc.org/isc/kea/1.5.0/kea-1.5.0.tar.gz
tar zxvf kea-1.5.0.tar.gz
rm kea-1.5.0.tar.gz
cd kea-1.5.0
./configure [your options here]
make
sudo make install

Installing from Source with MySQL (optional)

This is an optional dependency. You need it only if you want Kea to be able to store its information in MySQL.

You will need to run the scripts associated with installing Kea (above) before executing these commands:

sudo yum install mariadb-devel
./configure --with-mysql [your additional options here]
make
sudo make install

Installing from Source with Sysrepo or FreeRADIUS (optional)

Please consult the Kea GitLab wiki pages for instructions on installing Kea with the sysrepo or FreeRADIUS integrations.


The scripts on this page are known to work on a clean install of CentOS 7.5 (as-of 14-December-2018). Due to the complex dependancies, if this is run on an existing CentOS system with already installed components, it is not guaranteed to work.
Was this article helpful?