... | @@ -60,74 +60,115 @@ Note that older (1.3.0 and earlier) versions use --with-dhcp-mysql. Kea 1.4.0 an |
... | @@ -60,74 +60,115 @@ Note that older (1.3.0 and earlier) versions use --with-dhcp-mysql. Kea 1.4.0 an |
|
Sysrepo requires several extra dependencies like libredblack, libyang, etc.
|
|
Sysrepo requires several extra dependencies like libredblack, libyang, etc.
|
|
For more details check here: https://github.com/sysrepo/sysrepo/blob/master/INSTALL.md
|
|
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.
|
|
|
|
|
|
```
|
|
```
|
|
|
|
#!/bin/bash -x
|
|
# install all pre-built/native dependencies
|
|
# install all pre-built/native dependencies
|
|
sudo yum install cmake bison flex pcre-devel libev-devel protobuf-c-devel protobuf-c-compiler make rpm-build doxygen swig
|
|
sudo yum -y install cmake bison flex pcre-devel libev-devel protobuf-c-devel protobuf-c-compiler make rpm-build doxygen swig
|
|
sudo yum install autoconf automake libtool log4cplus-devel boost-devel gtest-devel
|
|
sudo yum -y install autoconf automake libtool gtest-devel
|
|
sudo yum install epel-release
|
|
sudo yum -y install openssl-devel
|
|
|
|
|
|
# Mocka is not needed (it's used for unit-tests for sysrepo)
|
|
|
|
# sudo yum install libcmocka-devel
|
|
|
|
|
|
|
|
sudo yum install centos-release-scl
|
|
|
|
|
|
|
|
# If you don't already have git installed, it is needed to fetch the source
|
|
# If you don't already have git installed, it is needed to fetch the source
|
|
sudo yum install git
|
|
sudo yum -y install git
|
|
# We also need to grab some packages via wget
|
|
# We also need to grab some packages via wget
|
|
sudo yum install 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
|
|
# 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).
|
|
# some of the dependencies (libyang requires at the very least a 4.9).
|
|
sudo yum install devtoolset-7-gcc*
|
|
sudo yum -y install devtoolset-7-gcc*
|
|
|
|
|
|
# enter devtools environment, this sets path to GCC 7, etc
|
|
# 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
|
|
# 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).
|
|
# shell, your environment will revert back to the standard tools (GCC 4.8.5).
|
|
scl enable devtoolset-7 bash
|
|
scl enable devtoolset-7 bash
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
#!/bin/bash -x
|
|
# fetch, build and install libredblack
|
|
# fetch, build and install libredblack
|
|
git clone https://github.com/sysrepo/libredblack.git
|
|
git clone https://github.com/sysrepo/libredblack.git
|
|
cd libredblack
|
|
cd libredblack
|
|
./configure
|
|
./configure
|
|
make
|
|
make
|
|
sudo make install
|
|
sudo make install
|
|
cd ..
|
|
cd ..
|
|
|
|
|
|
# Install libyang
|
|
# Install libyang
|
|
# Download the latest release version from https://github.com/CESNET/libyang/releases
|
|
# Download the latest release version from https://github.com/CESNET/libyang/releases
|
|
# During time of writing this document that was 0.16-r2.
|
|
# During time of writing this document that was 0.16-r1.
|
|
wget https://github.com/CESNET/libyang/archive/v0.16-r2.tar.gz
|
|
wget https://github.com/CESNET/libyang/archive/v0.16-r1.tar.gz
|
|
tar zxvf v0.16-r2.tar.gz
|
|
tar zxvf v0.16-r1.tar.gz
|
|
mv v0.16-r2 libyang-0.16-r2
|
|
rm v0.16-r1.tar.gz
|
|
cd libyang-0.16-r2; mkdir build; cd build
|
|
cd libyang-0.16-r1
|
|
cmake ..
|
|
mkdir build
|
|
make
|
|
cd build
|
|
sudo make install
|
|
cmake ..
|
|
cd ..
|
|
make
|
|
|
|
sudo make install
|
|
|
|
cd ../..
|
|
|
|
|
|
# Install Sysrepo
|
|
# Install Sysrepo
|
|
# Download the latest release version from https://github.com/sysrepo/sysrepo/releases
|
|
# 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.
|
|
# 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
|
|
wget https://github.com/sysrepo/sysrepo/archive/v0.7.5.tar.gz
|
|
tar zxvf v0.7.5.tar.gz
|
|
tar zxvf v0.7.5.tar.gz
|
|
mv v0.7.5 sysrepo-0.7.5
|
|
rm v0.7.5.tar.gz
|
|
cd sysrepo-0.7.5
|
|
cd sysrepo-0.7.5
|
|
mkdir build; cd build
|
|
mkdir 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 ..
|
|
cd build
|
|
make
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DGEN_LUA_BINDINGS=OFF -DENABLE_TESTS=OFF ..
|
|
sudo make install
|
|
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 ..
|
|
cd ..
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
#!/bin/bash -x
|
|
# Install Kea
|
|
# Install Kea
|
|
# Note: Once Kea 1.5.0 is available, you'll be able to download it from the FTP:
|
|
# 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
|
|
# 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
|
|
# 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:
|
|
# Until 1.5.0 release, you can use the latest development version from the gitlab:
|
|
# git clone https://gitlab.isc.org/isc-projects/kea.git
|
|
rm -rf kea
|
|
cd kea-1.5.0
|
|
git clone https://gitlab.isc.org/isc-projects/kea.git
|
|
|
|
cd kea
|
|
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
|
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
|
|
./configure --with-sysrepo
|
|
make
|
|
make -j4
|
|
sudo make install
|
|
sudo make install
|
|
``` |
|
``` |
|
|
|
\ No newline at end of file |