1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-16 00:00:02 +01:00
VILLASnode/doc/Install.md

84 lines
2.4 KiB
Markdown
Raw Normal View History

2015-08-09 23:58:03 +02:00
# Setup
2017-04-09 16:18:03 +02:00
VILLASnode can be installed in multiple ways:
- Using a pre-build Docker image
- Using pre-build RPM packages for Redhat based Linux distributions
- or from source
## Prerequisites
2017-04-09 16:18:03 +02:00
VILLASnode currently has the following list of dependencies:
2016-02-10 19:58:05 +01:00
- [libconfig](http://www.hyperrealm.com/libconfig/) for parsing the configuration file.
- [libnl3](http://www.infradead.org/~tgr/libnl/) for the network communication & emulation support of the `socket` node-type.
2016-06-08 23:21:42 +02:00
- libOpal{AsyncApi,Core,Utils} for running VILLASnode as an Asynchronous process inside your RT-LAB model.
2016-02-10 19:58:05 +01:00
- [libjansson](http://www.digip.org/jansson/) JSON parser for `websocket` and `ngsi` node-types.
- [libwebsockets](http://libwebsockets.org) for the `websocket` node-type.
- [libcurl](https://curl.haxx.se/libcurl/) for HTTP REST requests by the `ngsi` node-type.
2017-04-09 16:18:03 +02:00
- [openssl]()
2015-08-09 23:58:03 +02:00
There are two ways to install these dependencies:
1. You can most of the dependencies using the package manger of your Linux distribution:
2015-08-09 23:58:03 +02:00
Use the following command to install the dependencies under Debian-based distributions:
2017-04-09 16:18:03 +02:00
```
$ sudo apt-get install build-essential pkg-config wget tar cmake doxygen dia graphviz libconfig-dev libnl-3-dev libnl-route-3-dev libjansson-dev libcurl4-openssl-dev
```
2015-08-09 23:58:03 +02:00
or the following line for Fedora / CentOS / Redhat systems:
2017-04-09 16:18:03 +02:00
```
$ sudo yum install gcc pkgconfig make wget tar cmake openssl-devel doxygen dia graphviz libconfig-devel libnl3-devel libcurl-devel jansson-devel
```
2. Alternatively, you can use the build system to download, compile and install all dependencies:
2017-04-09 16:18:03 +02:00
```
$ make install-thirdparty
```
2017-04-09 16:18:03 +02:00
## Downloading VILLASnode
2017-04-09 16:18:03 +02:00
```
$ git clone --recursive git@git.rwth-aachen.de:VILLASframework/VILLASnode.git
$ cd VILLASnode
```
## Compilation
2015-08-22 17:40:17 +02:00
Checkout the `Makefile` and `include/config.h` for some options which have to be specified at compile time.
Afterwards, start the compilation with:
2017-04-09 16:18:03 +02:00
```
$ make
$ make run-tests
```
2015-08-22 17:40:17 +02:00
Append `V=5` to `make` for a more verbose debugging output.
Append `DEBUG=1` to `make` to add debug symbols.
2016-02-10 19:58:05 +01:00
## Installation
2016-02-10 19:58:05 +01:00
Install the files to your search path:
2017-04-09 16:18:03 +02:00
```
$ make install
$ make install-doc
```
2016-02-10 19:58:05 +01:00
Append `PREFIX=/opt/local` to change the installation destination.
## Test
2016-02-10 19:58:05 +01:00
Verify everything is working and required node-types are compiled-in:
2017-04-09 16:18:03 +02:00
```
$ villas node --help
```
2016-02-10 19:58:05 +01:00
2017-04-09 16:18:03 +02:00
Will print the current version including a list of all supported node-types, hooks, etc.