loraserver 源码解析 (二) 运行起来

loraserver 源码解析 (一) 构建

已经在build目录下生成了 loraserver


由于缺乏 redis 或 postgresql 或 mqtt broker 会导致无法执行下去

本文介绍如何安装部署它们


ubuntu 16.04 安装 最新 redis


ubuntu 16.04 安装 postgresql 10 并 配置成loraserver需要的


mqtt broker

参考 https://www.loraserver.io/loraserver/install/requirements/

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto


运行后 日志如下

~/go/gopath/src/github.com/brocaar/loraserver/build $ loraserver
INFO[0000] starting LoRa Server                          band=EU_863_870 docs="https://docs.loraserver.io/" net_id=000000 version=1.0.0-1-g3338792
INFO[0000] setup redis connection pool                   url="redis://localhost:6379"
INFO[0000] connecting to postgresql                     
INFO[0000] backend/gateway: TLS config is empty         
INFO[0000] backend/gateway: connecting to mqtt broker    server="tcp://localhost:1883"
INFO[0000] configuring join-server client                ca_cert= server="http://localhost:8003" tls_cert= tls_key=
INFO[0000] no network-controller configured             
INFO[0000] applying database migrations                 
INFO[0000] backend/gateway: connected to mqtt server    
INFO[0000] backend/gateway: subscribing to rx topic      qos=0 topic=gateway/+/rx
INFO[0000] backend/gateway: subscribing to stats topic   qos=0 topic=gateway/+/stats
INFO[0000] migrations applied                            count=11
INFO[0000] starting api server                           bind="0.0.0.0:8000" ca-cert= tls-cert= tls-key=
INFO[0000] starting downlink device-queue scheduler     

loraserver 源码解析 (三) 配置

猜你喜欢

转载自blog.csdn.net/wangjunsheng/article/details/80856411
今日推荐