|
|
Document moved to: https://kb.isc.org/v1/docs/kea-build-on-centos |
|
|
\ No newline at end of file |
|
|
Basic installation notes for CentOS are in the ISC knowledgebase at https://kb.isc.org/v1/docs/kea-build-on-centos.
|
|
|
|
|
|
## Installing from Source with Sysrepo (optional)
|
|
|
|
|
|
Sysrepo requires several extra dependencies like libredblack, libyang, etc. Note the libyang version is paired with the sysrepo one so when you update sysrepo you must first update libyang.
|
|
|
|
|
|
For more details check [here](https://github.com/CESNET/libyang/blob/master/README.md) and [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` packages are important as some of the software being installed are in both the base and the EPEL and it matters which repository they are pulled from. The first script also sets up the environment for the second and third (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:
|
|
|
```
|
|
|
# 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
|
|
|
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
|
|
|
|
|
|
# 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:
|
|
|
```
|
|
|
# Enable ccache
|
|
|
declare -x PATH="/usr/lib64/ccache:$PATH"
|
|
|
|
|
|
# fetch, build and install libredblack
|
|
|
git clone https://github.com/sysrepo/libredblack.git
|
|
|
cd libredblack
|
|
|
./configure
|
|
|
make
|
|
|
sudo make install
|
|
|
cd ..
|
|
|
|
|
|
# Install libyang
|
|
|
wget https://github.com/CESNET/libyang/archive/v0.16-r2.tar.gz
|
|
|
tar zxvf v0.16-r2.tar.gz
|
|
|
rm v0.16-r2.tar.gz
|
|
|
cd libyang-0.16-r2
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake ..
|
|
|
make
|
|
|
sudo make install
|
|
|
cd ../..
|
|
|
|
|
|
# The version of swig in the repositories is too old to work with sysrepo 0.7.7
|
|
|
wget http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz
|
|
|
tar xvfz swig-3.0.12.tar.gz
|
|
|
cd swig-3.0.12
|
|
|
./configure
|
|
|
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.7.
|
|
|
wget https://github.com/sysrepo/sysrepo/archive/v0.7.7.tar.gz
|
|
|
tar zxvf v0.7.7.tar.gz
|
|
|
rm v0.7.7.tar.gz
|
|
|
cd sysrepo-0.7.7
|
|
|
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 ../..
|
|
|
```
|
|
|
|
|
|
### Script 3:
|
|
|
```
|
|
|
# Install Kea
|
|
|
|
|
|
wget https://ftp.isc.org/isc/kea/1.5.0/kea-1.5.0.tar.gz
|
|
|
tar xvfz kea-1.5.0.tar.gz
|
|
|
cd kea-1.5.0
|
|
|
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
|
|
declare -x PATH="/usr/lib64/ccache:$PATH"
|
|
|
autoreconf --install
|
|
|
./configure --with-sysrepo [your additional options here]
|
|
|
make -j4
|
|
|
sudo make install
|
|
|
```
|
|
|
***
|
|
|
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. |
|
|
\ No newline at end of file |