IoT Gateway requires Java 8. If you don’t have Java installed, please download and install Java 8 using this link.
Create a working directory, for example, “C:\tb-gateway”. Download and unzip this installation archive to the working directory. The working directory should look like this after installation
Run install.bat script to install Gateway as a Windows service. This means it will be automatically started on system startup. Similar, uninstall.bat will remove Gateway from Windows services.
NOTE Scripts listed above should be executed using Administrator Role.
C:\tb-gateway>install.bat Detecting if it is 64-bit machine CurrentVersion 1.8 Java 1.8 found! Installing tb-gateway ... 2017-01-31 02:26:50,704 INFO - Starting ServiceWrapper in the CLI mode 2017-01-31 02:26:50,907 INFO - Completed. Exit code is 0 DONE.
Congratulations! ThingsBoard IoT Gateway is now installed on your Windows machine as a service.
Let’s configure your gateway before we start it!
Let’s skip extension configuration for now. We need to validate that gateway is able to successfully connect to ThingsBoard server first.
Now let’s start the gateway! Open command prompt as an Administrator and execute the following command
net start tb-gateway
The ThingsBoard Gateway service is starting. The ThingsBoard Gateway service was started successfully.
In order to restart the gateway you can execute following commands
net stop tb-gateway net start tb-gateway
The log files are located in logs folder (“C:\tb-gateway\logs” in our case).
The tb-gateway.log file should contain following line:
YYYY-MM-DD HH:mm:ss,sss [main] INFO o.t.gateway.GatewayApplication - Started GatewayApplication in x.xxx seconds (JVM running for x.xxx)