yanic/INSTALL.md

1.7 KiB

Howto install Yanic

go

Install

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:

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:

export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin

Yanic

Compile

go get -v -u github.com/FreifunkBremen/yanic/cmd/...

Work with other databases

If you did like a other database solution like influxdb, you are welcome to create another subpackage from database in your fork like the logging.

Configurate

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:

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 set dataPath in config.json to /data/ and put the build directory 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

cp /opt/go/src/github.com/FreifunkBremen/yanic/contrib/init/linux-systemd/yanic.service /lib/systemd/system/
systemctl daemon-reload
systemctl start yanic
systemctl enable yanic