[DOC] update install

This commit is contained in:
Martin/Geno 2019-10-13 10:48:44 +02:00
parent c1188378c4
commit be48b27470
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
3 changed files with 52 additions and 35 deletions

View File

@ -5,7 +5,7 @@
### Install ### Install
```sh ```sh
cd /usr/local/ cd /usr/local/
wget https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz -O go-release-linux-amd64.tar.gz wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz -O go-release-linux-amd64.tar.gz
tar xvf go-release-linux-amd64.tar.gz tar xvf go-release-linux-amd64.tar.gz
rm go-release-linux-amd64.tar.gz rm go-release-linux-amd64.tar.gz
``` ```
@ -62,7 +62,15 @@ the same directory as the `dataPath`. Change the path in the section
```sh ```sh
cp /opt/go/src/github.com/FreifunkBremen/yanic/contrib/init/linux-systemd/yanic.service /lib/systemd/system/yanic.service cp /opt/go/src/github.com/FreifunkBremen/yanic/contrib/init/linux-systemd/yanic.service /lib/systemd/system/yanic.service
systemctl daemon-reload systemctl daemon-reload
```
Before start, you should configure yanic by the file `/etc/yanic.conf`:
```sh
systemctl start yanic systemctl start yanic
```
Enable to start on boot:
```sh
systemctl enable yanic systemctl enable yanic
``` ```

View File

@ -19,25 +19,25 @@ Yet another node info collector
* Provide a little webserver for a standalone installation with a meshviewer * Provide a little webserver for a standalone installation with a meshviewer
## How it works ## How it works
In the first step Yanic sends a multicast message to the group `ff05::2:1001` and port `1001`.
In the first step Yanic sends a multicast message to the group `ff05:0:0:0:0:0:2:1001` and port `1001`.
Recently seen nodes that does not reply are requested via a unicast message. Recently seen nodes that does not reply are requested via a unicast message.
## Documentation ## Documentation
Take a look at the [git](https://github.com/FreifunkBremen/yanic/blob/master/SUMMARY.md) or [Gitbook](https://freifunkbremen.gitbooks.io/yanic/content/) Take a look at the [git](https://github.com/FreifunkBremen/yanic/blob/master/SUMMARY.md) or [Gitbook](https://freifunkbremen.gitbooks.io/yanic/content/)
# Installation
Take a look into the Documentation (see above) or for Quick Overview in [INSTALL.md](INSTALL.md).
If you like Docker you may want to take a look [here](https://github.com/christf/docker-yanic).
## Configuration ## Configuration
Read comments in [config_example.toml](config_example.toml) for more information. Read comments in [config_example.toml](config_example.toml) for more information.
## Running ## Running
Yanic provides several commands: Yanic provides several commands:
### Usage ### Usage
Run Yanic without any arguments to get the usage information: Run Yanic without any arguments to get the usage information:
``` ```
Usage: Usage:
yanic [command] yanic [command]
@ -50,57 +50,71 @@ Available Commands:
Flags: Flags:
-h, --help help for yanic -h, --help help for yanic
--loglevel uint32 Show log message starting at level (default 40)
--timestamps Enables timestamps for log output --timestamps Enables timestamps for log output
Use "yanic [command] --help" for more information about a command. Use "yanic [command] --help" for more information about a command.
``` ```
#### Serve #### Serve
Runs the yanic server
``` ```
Usage: Usage:
yanic serve [flags] yanic serve [flags]
Examples: Examples:
yanic serve --config /etc/yanic.toml yanic serve --config /etc/yanic.toml
Flags: Flags:
-c, --config string Path to configuration file (default "config.toml") -c, --config string Path to configuration file (default "config.toml")
-h, --help help for serve -h, --help help for serve
Global Flags:
--loglevel uint32 Show log message starting at level (default 40)
--timestamps Enables timestamps for log output
```
#### Query
Sends a query on the interface to the destination and waits for a response
```
Usage:
yanic query <interfaces> <destination> [flags]
Examples:
yanic query "eth0,wlan0" "fe80::eade:27ff:dead:beef"
Flags:
-h, --help help for query
--ip string ip address which is used for sending (optional - without definition used the link-local address)
--port int define a port to listen (if not set or set to 0 the kernel will use a random free port at its own)
--wait int Seconds to wait for a response (default 1)
Global Flags:
--loglevel uint32 Show log message starting at level (default 40)
--timestamps Enables timestamps for log output
``` ```
#### Import #### Import
Imports global statistics from the given RRD files (ffmap-backend).
``` ```
Usage: Usage:
yanic import <file.rrd> [flags] yanic import <file.rrd> <site> <domain> [flags]
Examples: Examples:
yanic import --config /etc/yanic.toml olddata.rrd yanic import --config /etc/yanic.toml olddata.rrd global global
Flags: Flags:
-c, --config string Path to configuration file (default "config.toml") -c, --config string Path to configuration file (default "config.toml")
-h, --help help for import -h, --help help for import
Global Flags:
--loglevel uint32 Show log message starting at level (default 40)
--timestamps Enables timestamps for log output
``` ```
#### Query
```
Usage:
yanic query <interface> <destination> [flags]
Examples:
yanic query wlan0 "fe80::eade:27ff:dead:beef"
Flags:
-h, --help help for query
--wait int Seconds to wait for a response (default 1)
```
## Communities using Yanic ## Communities using Yanic
* **Freifunk Bremen** uses InfluxDB, [Grafana](https://grafana.bremen.freifunk.net), and [Meshviewer](https://map.bremen.freifunk.net) with a patch to show state-version of `nodes.json`. * **Freifunk Bremen** uses InfluxDB, [Grafana](https://grafana.bremen.freifunk.net), and [Meshviewer](https://map.bremen.freifunk.net) with a patch to show state-version of `nodes.json`.
* **Freifunk Nord** uses [hopglass](https://github.com/hopglass/hopglass) (commit 587740a) as frontend: https://mesh.freifunknord.de/ * **Freifunk Nord** uses [hopglass](https://github.com/hopglass/hopglass) (commit 587740a) as frontend: https://mesh.freifunknord.de/
* **Freifunk Kiel** uses [Meshviewer](https://github.com/ffrgb/meshviewer/) as frontend: https://map.freifunk.in-kiel.de/ * **Freifunk Kiel** uses [Meshviewer](https://github.com/ffrgb/meshviewer/) as frontend: https://map.freifunk.in-kiel.de/
@ -108,7 +122,6 @@ Flags:
Do you know someone else using Yanic? Create a [pull request](https://github.com/FreifunkBremen/yanic/issues/new?template=community.md&title=Mention+community+$name)! Do you know someone else using Yanic? Create a [pull request](https://github.com/FreifunkBremen/yanic/issues/new?template=community.md&title=Mention+community+$name)!
## Related projects ## Related projects
Collecting data from respondd: Collecting data from respondd:
* [HopGlass Server](https://github.com/plumpudding/hopglass-server) written in Node.js * [HopGlass Server](https://github.com/plumpudding/hopglass-server) written in Node.js
@ -118,5 +131,4 @@ Respondd for servers:
## License ## License
This software is licensed under the terms of the [AGPL v3 License](LICENSE). This software is licensed under the terms of the [AGPL v3 License](LICENSE).

View File

@ -12,7 +12,6 @@ rm go-release-linux-amd64.tar.gz
### Configure go ### Configure go
Add these lines in your root shell startup file (e.g. `/root/.bashrc`): Add these lines in your root shell startup file (e.g. `/root/.bashrc`):
```sh ```sh
export GOPATH=/opt/go export GOPATH=/opt/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
@ -34,14 +33,12 @@ systemctl daemon-reload
``` ```
Before start, you should configure yanic by the file `/etc/yanic.conf`: Before start, you should configure yanic by the file `/etc/yanic.conf`:
```sh
```
systemctl start yanic systemctl start yanic
``` ```
Enable to start on boot: Enable to start on boot:
```sh
```
systemctl enable yanic systemctl enable yanic
``` ```