目录
MQTT服务器:MQTT broker https://mosquitto.org/download/
基于开源的lorawan平台ChirpStack,更多详情https://www.chirpstack.io
本地部署需要安装如下软件:
-
MQTT服务器:MQTT broker https://mosquitto.org/download/
安装成功后,需要在服务里启动MQTTserver。
-
Redis https://redis.io/
Redis是一个开源的数据结构服务器,解压安装包,免安装运行redis-server.exe,选择默认配置即可,无须更改配置。
-
PostgreSQL
PostgreSQL是一个功能非常强大的、源代码开放的客户/服务器关系型数据库管理系统(RDBMS),更多详情https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
在postgresql里创建账户和数据库,可使用pgadmin4工具,也可以使用SQL shell工具命令行配置。
执行如下命令:
建立NS的账户和数据库
-- create the chirpstack_ns user with password 'dbpassword'
create role chirpstack_ns with login password 'dbpassword';
-- create the chirpstack_ns database
create database chirpstack_ns with owner chirpstack_ns;
-- exit the prompt
\q
建立AS的账户和数据库
-- create the chirpstack_as user
create role chirpstack_as with login password 'dbpassword';
-- create the chirpstack_as database
create database chirpstack_as with owner chirpstack_as;
-- enable the trigram and hstore extensions
\c chirpstack_as
create extension pg_trgm;
create extension hstore;
-- exit the prompt
\q
-
Gateway Bridge
首先是修改配置文件,关联对应的数据库
只需要修改接收端口udp port
其他配置保持默认。然后选择在命令行窗口运行可执行文件
-
Network Server
与bridge相似,修改配置文件然后运行执行文件。
修改postgresql.dsn,需要用户名和密码,以及数据库与之前建立的名称一致
-
Application Server
与bridge相似,修改配置文件然后运行执行文件。
修改postgresql.dsn,需要用户名和密码,以及数据库与之前建立的名称一致
如果需要使用API,需要设置JWT秘钥
其他配置保持默认。
安装完成之后,用户可以访问web页面http://localhost:8080/