|
|
# System-Specific Install Notes
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
For the basic installation notes, please see [ISC's Knowledgebase](https://kb.isc.org/v1/docs/kea-build-on-ubuntu). This wiki page documents installation for the integration of Kea with Sysrepo (NETCONF) and RADIUS. Also note that in most cases using native DEB packages are much easier way to get Kea installed quickly.
|
|
|
|
|
|
## Building with FreeRADIUS (optional)
|
... | ... | @@ -41,7 +43,7 @@ FreeRADIUS client: |
|
|
```
|
|
|
then compile as usual. (The version and extended version fields will reflect the version of Kea you are building.)
|
|
|
|
|
|
## Building with NETCONF/Sysrepo (optional)
|
|
|
## Building with NETCONF/Sysrepo 0.x (optional, Kea 1.9.9 and earlier)
|
|
|
Kea 1.5 introduced support for NETCONF. To build with this support, software called Sysrepo is needed.
|
|
|
|
|
|
The following installation instruction was tested on Ubuntu 18.04.
|
... | ... | @@ -138,3 +140,63 @@ sysrepoctl -i -s . -g kea-ctrl-agent@2019-08-12.yang |
|
|
sysrepoctl -i -s . -g kea-dhcp-ddns@2019-08-12.yang
|
|
|
sysrepoctl -i -s . -g keatest-module@2018-11-20.yang
|
|
|
```
|
|
|
|
|
|
## Building with NETCONF/Sysrepo 1.x (optional, Kea 1.9.10 and later)
|
|
|
|
|
|
The following installation instruction was tested on Ubuntu 21.04.
|
|
|
|
|
|
**STEP 1**. Install libyang. Download libyang from https://github.com/CESNET/libyang/releases. The last version tested with Kea 1.9.10 was libyang 1.0.240. Compared to earlier libyang versions, many external dependencies were removed.
|
|
|
|
|
|
**NOTE**. As of July 2021, the recently released Sysrepo 2.0/libyang 2.0 does not provide C++ binding yet, as such are unusable for Kea. please use Sysrepo 1.x and libyang 1.x.
|
|
|
|
|
|
```
|
|
|
tar zxvf libyang-1.0.240.tar.gz
|
|
|
cd libyang-1.0.240
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake ..
|
|
|
make
|
|
|
sudo make install
|
|
|
```
|
|
|
|
|
|
For detailed build instructions, see https://github.com/CESNET/libyang.
|
|
|
|
|
|
**STEP 2**. Install syrepo. Download sysrepo from https://github.com/sysrepo/sysrepo/releases. The last version tested with Kea 1.9.10 was 0.7.8. Note the sysrepo version is paired with the libyang one so when sysrepo is upgraded libyang must be upgraded first.
|
|
|
|
|
|
```
|
|
|
tar zxvf sysrepo-1.4.140.tar.gz
|
|
|
cd sysrepo-1.4.140/
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON \
|
|
|
-DGEN_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF ..
|
|
|
make
|
|
|
sudo make install
|
|
|
```
|
|
|
|
|
|
Note sysrepo has many more compilation flags that may be considered, including storage location, access permissions and more. For detailed instructions, see Build and Installation Steps Section on the project page https://github.com/sysrepo/sysrepo.
|
|
|
|
|
|
**STEP 3**: Configure kea's `sysrepo_config` tool. Copy file `tools/sysrepo_config_defines.sh.sample` to `tools/sysrepo_config_defines.sh` and edit `LIBYANG_PATH` and `SYSREPO_PATH` variables. If both were installed in the default locations, the file should contain the following:
|
|
|
```
|
|
|
export LIBYANG_PATH="/usr/local"
|
|
|
export SYSREPO_PATH="/usr/local"
|
|
|
```
|
|
|
|
|
|
You can test if this step looks complete by calling `tools/sysrepo_config --libs libsysrepo`. It should print the locations where sysrepo and libyang are located, similar to this:
|
|
|
|
|
|
```
|
|
|
$ tools/sysrepo_config --libs libsysrepo-cpp
|
|
|
-L/usr/local/lib/ -L/usr/local/lib/ -lyang-cpp -lsysrepo-cpp
|
|
|
```
|
|
|
|
|
|
**STEP 4**: Compile Kea with Sysrepo enabled: ```./configure --with-sysrepo=./tools/sysrepo_config```. Once the configure script completes, it will print many configuration options. The section about Sysrepo should look similar to this:
|
|
|
|
|
|
```
|
|
|
Sysrepo:
|
|
|
SYSREPO_VERSION: v1.4.140
|
|
|
SYSREPO_CPPFLAGS: -I/usr/local/include/ -I/usr/local/include/
|
|
|
SYSREPO_LIBS: -L/usr/local/lib/ -L/usr/local/lib/ -lyang -lsysrepo -L/usr/local/lib/ -L/usr/local/lib/ -lyang-cpp -lsysrepo-cpp
|
|
|
SYSREPO_REPO: /home/thomson/devel/sysrepo-1.4.140/build/repository
|
|
|
```
|
|
|
|
|
|
Now compile Kea as usual (`make -j8`, `sudo make install`). |
|
|
\ No newline at end of file |