From c3353ec599c9ddedf5be87cb6b25fc5f38c5ab84 Mon Sep 17 00:00:00 2001 From: Geno Date: Sun, 5 Mar 2017 20:59:03 +0100 Subject: [PATCH] [DOC] Installation --- INSTALL.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..f648a06 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,57 @@ +# Howto install Yanic + +## go +### Install +```sh +cd /usr/local/ +wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz +tar xvf go1.8.linux-amd64.tar.gz +rm go1.8.linux-amd64.tar.gz +``` + +### Configurate +put this lines into a shell place at root: +```sh +export GOPATH=/opt/go +export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin +``` + +put this lines also into a shell place to use go by normal user: +```sh +export GOPATH=~/go +export PATH=$PATH:$GOPATH/bin +``` + +## Yanic + +### Compile +```sh +go get -v -u github.com/FreifunkBremen/yanic/cmd/... +``` + +### Configurate +```sh +cp /opt/go/src/github.com/FreifunkBremen/yanic/config_example.toml /etc/yanic.conf +``` +You only need to edit `/etc/yanic.conf` under section `[respondd]` the `interface` for a easy startup. +And create the following folders: +```sh +mkdir -p /var/lib/collector +mkdir -p /var/www/html/meshviewer/data +``` + +#### Standalone +If you like to run a meshviewer standalone, just set `enable` under section `[webserver]` to `true`. +Configurate the meshviewer to `/data/` and put the `build` directory of this [meshviewer](https://github.com/ffrgb/meshviewer) under `/var/www/html/meshviewer`. + +#### With webserver (Apache, nginx) +Change following path under section `[nodes]` to what you need. +For `nodes_path` and `graph_path` should be under the same folder for a meshviewer. + +### Service +```bash +cp /opt/go/src/github.com/FreifunkBremen/yanic/init/linux-systemd/yanic.service /lib/systemd/systemd +systemctl daemon-reload +systemctl start yanic +systemctl enable yanic +```