ThingsBoard使用笔记(1)安装使用篇

网上资料

官方安装指南

https://thingsboard.io/docs/installation/

从官方发布的安装指南可以看到,ThingsBoard 最新版本分 Community Edition 社区版和 Professional Edition 专业版,社区版安装较为简单,不需要单独安装配置数据库不过仅作为测试和学习,如果要大规模应用于生产最好还是安装 Professional Edition 专业版。

thingsboard/tb-cassandra – 超级大的single instance of ThingsBoard with Cassandra database.The most performant and recommended option but requires at least 4GB of RAM. 8GB is recommended.

thingsboard/tb-postgres – 一般的single instance of ThingsBoard with PostgreSQL database.Recommended option for small servers with at least 1GB of RAM and minimum load (few messages per second). 2-4GB is recommended.

thingsboard/tb – 最小型的 single instance of ThingsBoard with embedded HSQLDB database.Note: Not recommended for any evaluation or production usage and is used only for development purposes and automatic tests.

其他安装可以参照

https://blog.csdn.net/julyqian/article/details/88081367

填坑

https://www.cnblogs.com/danny-djy/p/9051714.html

本 ID 就是参照这两片文章,在本地用 eclipse 导入后跑起来的,写的很细安装过程就不再重复了,接下来本 ID 会连载几篇文章介绍 ThingsBoard 的使用,边学习边记录。

————————————————

版权声明:本文为 CSDN 博主「ieflex」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。

原文链接: https://blog.csdn.net/ieflex/article/details/96484063

拓展:

https://blog.csdn.net/Wondser/article/details/107108713

https://forum.iotschool.com/wiki/tbinstall#Server%20UI%20%E7%BC%96%E8%AF%91%E5%A4%B1%E8%B4%A5


maven 镜像源配置

由于默认仓库地址的下载速度很慢,因此使用阿里云的镜像会节省很多时间。maven conf 目录下的 settings.xml 配置如下:

 <mirrors>
    <mirror>  
   		<id>nexus-aliyun</id>  
   		<mirrorOf>central</mirrorOf>    
   		<name>Nexus aliyun</name>  
   		<url>https://maven.aliyun.com/repository/public</url>  
   	</mirror> 
 </mirrors>

根据目前试验,maven 仓库要设置成阿里云的这个地址,才可以下载下来包

码云地址

此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。

https://gitee.com/mirrors/ThingsBoard?_from=gitee_search

官方社区入门级教程: https://forum.iotschool.com/wiki/tbinstall#%E8%AE%BE%E7%BD%AEMaven%E4%B8%BA%E6%B7%98%E5%AE%9D%E9%95%9C%E5%83%8F


自己安装

编译过程

输入 git 命令克隆源代码

git clone https://gitee.com/mirrors/ThingsBoard.git

切换 git 分支

git checkout release-3.0

输入编译命令开始编译

mvn clean install -DskipTests -X

错误异常

各种错误异常以上的网上资料已经记录的十分详细,下面几点是我再部署过程中的经验:

  1. 3.0 不需要换淘宝 maven 地址,淘宝 npm 地址,使用默认的地址下载即可,耐心等待,根据网速问题可能几分钟到半小时。
  2. 如果编译失败,最好删掉整个文件夹,重新下载编译,用码云地址下载速度很快。

运行过程

安装 postgresql

postgresql 安装教程: https://www.runoob.com/postgresql/postgresql-tutorial.html

可根据菜鸟教程的方法下载安装,没有什么问题。下载版本使用最新版本;

sql 管理工具使用自带的 pgAdmin 即可;

pgAdmin 教程: https://blog.csdn.net/qq_28289405/article/details/80243476

安装 redis

https://blog.csdn.net/julyqian/article/details/88081367

在此教程中有安装教程

修改配置文件

见以上教程资料中有详细介绍,修改 postgresql 时在配置文件中搜索 postgresql 就能找到配置的地方

运行

打开浏览器,输入 http://localhost:8080 网址链接,即可进入登录界面

图片

管理员:
用户名:sysadmin@thingsboard.org 
密码为:sysadmin
初始数据库中只有管理员账号,租户账号需要管理员登录系统后添加
租户:
tenant@thingsboard.org /tenant
客户:
customer@thingsboard.org /customer

进入以后 大功告成!
管理员进入后可以创建租户

错误异常

  1. Command line is too long. Shorten command line for

图片

方法 1:

找到项目下的.idea/workspace.xml,在标签里添加一行属性:

<component name="PropertiesComponent">
 其它属性不改
 <property name="dynamic.classpath" value="true" />
</component>

方法 2:
打开程序的运行配置,把 Shorten command line 改为 JAR manifest 或 classpath file,如图所示:

图片

2.导入 idea 后少包抱红线

可更换 jdk 版本为 1.8,安装 lombok 插件


使用过程

数据初始化

https://forum.iotschool.com/topics/712

错误异常

sql 文件导入不正确

3.0 项目中的 sql 文件导入后有问题,启动不起来,会报这个错误

图片

在官方的安装包执行初始化 demo 命令后的 sql 文件是正确的

安装包部署介绍:
https://thingsboard.io/docs/user-guide/install/windows/
安装包下载地址:https://github.com/thingsboard/thingsboard/releases/download/v3.0.1/thingsboard-windows-3.0.1.zip

back.sql

图片

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值