These instructions are split into three separate scripts:
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).
Install certain dependancies from source. These are not (at the time of this writing) available as package based installs.
Install Kea from the git archive.
# install all pre-built/native dependenciessudo yum -y install cmake bison flex pcre-devel libev-devel protobuf-c-devel protobuf-c-compiler make rpm-build doxygensudo yum -y install autoconf automake libtool gtest-develsudo yum -y install openssl-devel# If you don't already have git installed, it is needed to fetch the sourcesudo yum -y install git# We also need to grab some packages via wgetsudo yum -y install wget# Now, add the community toolssudo 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 versionsudo yum -y install boost-devel# Allow environment modificationsudo 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
# Enable ccachedeclare -x PATH="/usr/lib64/ccache:$PATH"# fetch, build and install libredblackgit clone https://github.com/sysrepo/libredblack.gitcd libredblack ./configure make sudo make installcd ..# Install libyangwget https://github.com/CESNET/libyang/archive/v0.16-r2.tar.gztar zxvf v0.16-r2.tar.gzrm v0.16-r2.tar.gz cd libyang-0.16-r2 mkdir build cd build cmake .. make sudo make installcd ../..# The version of swig in the repositories is too old to work with sysrepo 0.7.7wget http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gztar xvfz swig-3.0.12.tar.gzcd swig-3.0.12 ./configure make sudo make installcd ..# 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.gztar zxvf v0.7.7.tar.gzrm v0.7.7.tar.gzcd 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 installcd ../..
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.