|
|
## CentOS System-Specific Install Notes
|
|
|
|
|
|
2017-06-26: This page documents Kea installation on CentOS 7. It covers two installation procedures: using ready to use rpm (the easy one) and compiling from source (slightly more complicated, but still easy).
|
|
|
|
|
|
## Install from rpm packages
|
|
|
RPM packages are not available in base CentOS repositories, but they are available in EPEL (Extra Packages for Entreprise Linux), which is a very rich set of additional packages. If you never installed anything from EPEL, here's what you should do:
|
|
|
|
|
|
```#!bash
|
|
|
$ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
|
|
$ sudo yum repolist
|
|
|
$ sudo yum install kea
|
|
|
```
|
|
|
|
|
|
The first command will add EPEL as additional packages repository to your system. You only need to do this if you never used EPEL before.
|
|
|
|
|
|
The second command will download list of available repositories. It seems like a good idea to issue that command every time before you install anything, so your list is up to date.
|
|
|
|
|
|
The this command installs kea package.
|
|
|
|
|
|
The downside of this approach is that as of today (2017-06-26), the version available as packages is 1.1.0. Hopefully, 1.2.0 will be packaged by EPEL maintainers soon. If you want to get 1.2.0, you should use installation from the sources instead.
|
|
|
|
|
|
## Install from sources
|
|
|
|
|
|
This approach requires a bit more work, but it gives you Kea 1.2.0.
|
|
|
|
|
|
First, you need to install dependencies. The following packages are a minimum to build kea: gcc-g++, openssl-devel, log4cplus-devel, boost-devel. wget is not needed, but it's a convenient tool for downloading kea (or any other files). If you need to support any optional databases (MySQL, PostgreSQL or Cassandra), please install development packages for them and use --with-dhcp-mysql, --with-dhcp-pgsql and/or --with-cql parameters for ./configure script.
|
|
|
|
|
|
```
|
|
|
$sudo yum install gcc-g++ openssl-devel log4cplus-devel boost-devel wget
|
|
|
```
|
|
|
|
|
|
Once those are installed, you can get kea sources and extract them:
|
|
|
|
|
|
```
|
|
|
$ wget -nd http://ftp.isc.org/isc/kea/1.2.0/kea-1.2.0.tar.gz
|
|
|
$ tar zxvf kea-1.2.0.tar.gz
|
|
|
$ cd kea-1.2.0
|
|
|
$ ./configure --with-your-favourite-options-here
|
|
|
$ make
|
|
|
$ sudo make install
|
|
|
```
|
|
|
|
|
|
## Installing from sources 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:
|
|
|
|
|
|
```
|
|
|
$ sudo yum install mariadb-devel
|
|
|
$ ./configure --with-dhcp-mysql [your other configuration parameters go here]
|
|
|
$ make
|
|
|
$ sudo make install
|
|
|
```
|
|
|
|
|
|
Note that older (1.3.0 and earlier) versions use --with-dhcp-mysql. Kea 1.4.0 and newer use --with-mysql.
|
|
|
|
|
|
## Installing from sources with Sysrepo (optional)
|
|
|
|
|
|
2018-10-12: This information pertains to install upcoming Kea 1.5.0 on CentOS 7.5.
|
|
|
|
|
|
Sysrepo requires several extra dependencies like libredblack, libyang, etc.
|
|
|
For more details check here: https://github.com/sysrepo/sysrepo/blob/master/INSTALL.md
|
|
|
|
|
|
These instructions are split into three separate scripts:
|
|
|
1) Install package based dependancies. The order of the `yum install`s are important as some of the items being installed are in both the base and the EPML and it matters which place they are pulled from. The first script also sets up the environment for the second one (compilers, etc).
|
|
|
2) Install certain dependancies from source. These are not (at the time of this writing) available as package based installs.
|
|
|
3) Install Kea from the git archive.
|
|
|
|
|
|
Script 1:
|
|
|
```
|
|
|
#!/bin/bash -x
|
|
|
# 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 is 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
|
|
|
|
|
|
# Allow environment diddling
|
|
|
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:
|
|
|
```
|
|
|
#!/bin/bash -x
|
|
|
# fetch, build and install libredblack
|
|
|
git clone https://github.com/sysrepo/libredblack.git
|
|
|
cd libredblack
|
|
|
./configure
|
|
|
make
|
|
|
sudo make install
|
|
|
cd ..
|
|
|
|
|
|
# Install libyang
|
|
|
# Download the latest release version from https://github.com/CESNET/libyang/releases
|
|
|
# During time of writing this document that was 0.16-r1.
|
|
|
wget https://github.com/CESNET/libyang/archive/v0.16-r1.tar.gz
|
|
|
tar zxvf v0.16-r1.tar.gz
|
|
|
rm v0.16-r1.tar.gz
|
|
|
cd libyang-0.16-r1
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake ..
|
|
|
make
|
|
|
sudo make install
|
|
|
cd ../..
|
|
|
|
|
|
# Install Sysrepo
|
|
|
# Download the latest release version from https://github.com/sysrepo/sysrepo/releases
|
|
|
# At the time of writing this document the latest version was 0.7.5.
|
|
|
wget https://github.com/sysrepo/sysrepo/archive/v0.7.5.tar.gz
|
|
|
tar zxvf v0.7.5.tar.gz
|
|
|
rm v0.7.5.tar.gz
|
|
|
cd sysrepo-0.7.5
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_LUA_BINDINGS=OFF -DENABLE_TESTS=OFF ..
|
|
|
make
|
|
|
sudo make install
|
|
|
cd ../..
|
|
|
|
|
|
wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz
|
|
|
tar xfz boost_1_65_1.tar.gz
|
|
|
cd boost_1_65_1
|
|
|
./bootstrap.sh
|
|
|
./b2 --with-system --with-thread --with-date_time --with-regex --with-serialization
|
|
|
sudo ./b2 --with-system --with-thread --with-date_time --with-regex --with-serialization install
|
|
|
cd ..
|
|
|
```
|
|
|
|
|
|
Script 3:
|
|
|
```
|
|
|
#!/bin/bash -x
|
|
|
# Install Kea
|
|
|
# Note: Once Kea 1.5.0 is available, you'll be able to download it from the FTP:
|
|
|
# wget -nd http://ftp.isc.org/isc/kea/1.5.0/kea-1.5.0.tar.gz
|
|
|
# tar zxvf kea-1.5.0.tar.gz
|
|
|
|
|
|
# wget https://raw.githubusercontent.com/chriskohlhoff/asio/master/asio/include/asio/coroutine.hpp
|
|
|
# sudo mv coroutine.hpp /usr/include/boost/asio
|
|
|
|
|
|
#
|
|
|
# Until 1.5.0 release, you can use the latest development version from the gitlab:
|
|
|
rm -rf kea
|
|
|
git clone https://gitlab.isc.org/isc-projects/kea.git
|
|
|
cd kea
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
|
|
# export CC="ccache gcc" CXX="ccache g++"
|
|
|
declare -x PATH="/usr/lib64/ccache:$PATH"
|
|
|
autoreconf --install
|
|
|
./configure --with-sysrepo
|
|
|
make -j4
|
|
|
sudo make install
|
|
|
```
|
|
|
|
|
|
This script is known to work on a clean install of CentOS 7.5 (as-of 23-OCT-2018). If this is run on an existing CentOS system with already installed components, it is not guaranteed to work. |
|
|
\ No newline at end of file |
|
|
Document moved to: https://kb.isc.org/v1/docs/kea-build-on-centos |
|
|
\ No newline at end of file |