Thingsboard Installation on Windows

本文详细介绍如何在Windows上安装ThingsBoard物联网平台,包括安装Java 8、Apache Cassandra及ThingsBoard服务等步骤,并指导如何配置数据库模式及启动服务。

Thingsboard Installation on Windows

Thingsboard Installation on Windows

Table of Content [show]

Overview

Thingsboard, a leading open-source Internet of Things (IoT) platform, is used for managing devices, collecting data, and processing and visualizing your IoT projects. It aids device connectivity through industry standard IoT protocols such as MQTT, CoAP, and HTTP. It supports both cloud and on-premises deployment.

Thingsboard provides live demo instance for quick testing. Thingsboard can also be installed locally for long term projects. In this blog, let us discuss about step by step procedure for installing Thingsboard on Windows.

Prerequisites

Download and install the following:

Hardware

  • Windows Machine with OS version 7 and above
  • Windows 32-bit and 64-bit (both are compatible) machines
  • RAM 4 GB

Installing Java 8

Install Java 8 on Windows machine. If already installed, check the version of Java by using the below command:

select

Installing Apache Cassandra

As Apache Cassandra is needed for Thingsboard service, you need to install Apache Cassandra. In this section, let us discuss about installing Cassandra. If Cassandra is already installed, skip this step.

Installing DataStax

To install DataStax, perform the following steps:

select

  • Provide the path of the destination folder in the Destination Folder page as shown in the below diagram (3) and click Next.
  • Check the option in Service Configuration page as shown in the below diagram (4):

select

You will be redirected to the installation setup completed page.

  • Click Finish to close the installation window.

select

  • On successfully installing DataStax Community Edition, open your installation package from your local machine and check Apache Cassandra related CQL Shell files and so on.

select

Installing Thingsboard Service

In this section, let us discuss about installing and configuring Thingsboard service.

To install Thingsboard service, perform the following steps:

select

  • Open thingsboard folder.
    You can get the files as shown in the below diagram:

select

  • Open Windows PC administrator command prompt by searching cmd and clicking “Ctrl + Shift + Enter” keys.
  • Enter the below command to install the Windows batch file:
select

Now, Thingsboard has been successfully installed on your Windows machine.

Provisioning Database Schema

To provision database schema, perform the following steps:

  • Open Apache Cassandra installation file from your location machine.
  • Execute 3 cqslh scripts as shown in the below diagram using “Cassandra CQL Shell“:

select

  • Execute the below list of queries one by one:
    • cqlsh> source ‘c:\thingsboard\data\schema.cql’;
    • cqlsh> source ‘c:\thingsboard\data\system-data.cql’;
    • cqlsh> source ‘c:\thingsboard\data\demo-data.cql’;

Starting Thingsboard Service

To start Thingsboard service, perform the following steps:

  • Click Windows Start button.
  • Search cmd and click “Ctrl + Shift + Enter” keys to execute administrator command prompt.
  • Use the below command to start the Thingsboard service:
select

Note: To stop and restart the Thingsboard services, use the below commands:

  • Browse your default localhost (http://localhost:8080/) with port number on your browser.
    You will be redirected to the below Thingsboard local Windows machine sign in page as shown in the below diagram:

select

  • Sign in to start accessing Thingsboard.

Conclusion

In this blog, we discussed about installation of the leading IoT open source cloud platform – Thingsboard on local Windows machine. In the upcoming blogs, let us discuss about configuring external access to Thingsboard webUI with some device connectivity to use communication protocols with some complex use cases. To know about installing Thingsboard IoT gateway on Windows, refer our blog on Thingsboard Gateway IoT.

References

Getting Started: https://thingsboard.io/docs/getting-started-guides/helloworld/

在安装 ThingsBoard 时遇到“Unexpected Error”提示,通常涉及系统环境配置、依赖组件缺失或服务未正常启动等因素。以下是针对此类问题的解决方案: ### 检查并启动关键 Windows 服务 如果安装过程中提示“Unexpected Error: Quitting”,这可能与 DCOM Server Process Launcher 服务未启动有关。此服务是许多安装程序所依赖的关键组件之一。可以通过以下步骤确保该服务已启用: - 打开“服务”管理器(`services.msc`)。 - 查找 `DCOM Server Process Launcher` 服务。 - 如果其状态为“停止”,右键选择“启动”。 - 同时将启动类型设置为“自动”,以防止未来再次出现类似问题[^3]。 ### 验证 Java 环境配置 ThingsBoard 是基于 Java 的平台,因此需要正确安装和配置 Java 运行环境(JRE)或 Java 开发工具包(JDK)。请确保: - 已安装支持的 Java 版本(建议使用 OpenJDK 或 Oracle JDK 11)。 - 系统环境变量中已设置 `JAVA_HOME`,并且指向正确的 Java 安装目录。 - 在命令行中运行 `java -version` 和 `javac -version` 来验证安装是否成功。 ### 检查 ThingsBoard 安装日志 安装程序的日志文件通常位于临时目录(如 `%TEMP%`)或指定的日志路径下。通过查看日志文件可以获取更详细的错误信息,从而帮助定位问题根源。例如: - 日志可能会指出端口冲突、数据库连接失败或内存不足等问题。 - 根据日志中的具体错误信息进行针对性修复。 ### 安装必要的依赖库 某些情况下,缺少 Microsoft Visual C++ Redistributable Package 可能导致安装失败。确保系统上已安装以下组件: - Microsoft Visual C++ 2015–2022 Redistributable (x64)。 - 若使用 Windows 系统作为开发环境,还需安装 .NET Framework 4.7 或更高版本。 ### 使用命令行手动启动 ThingsBoard 服务 如果图形化安装程序无法正常运行,可以尝试通过命令行方式手动启动 ThingsBoard 服务。进入安装目录后,执行如下命令: ```bash cd thingsboard/bin run.bat --install ``` 若安装成功,则可以进一步使用以下命令启动服务: ```bash run.bat --start ``` ### 示例:检查 DCOM Server Process Launcher 是否运行 ```powershell Get-Service -Name "DcomLaunch" ``` 如果服务状态为“Stopped”,则运行以下命令启动服务: ```powershell Start-Service -Name "DcomLaunch" ``` ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值