Thingsboard is deployed in the window

table of Contents

Use software environment

Software installation steps

JDK8 installation

postgresql-13.3-2-windows-x64.exe installation

timescaledb-postgresql-13_2.2.1-windows-amd64 installation

Load extended timescaledb

Deploy ThingsBoard


Use software environment

jdk1.8.0_202, postgresql-13.3-2-windows-x64.exe, timescaledb-postgresql-13_2.2.1-windows-amd64, thingsboard-windows-3.0

Use the above environment version to deploy successfully in the window system,

Software installation steps

JDK8 installation

JDK8 installation is not introduced here

postgresql-13.3-2-windows-x64.exe installation

Download link: https://get.enterprisedb.com/postgresql/postgresql-13.3-2-windows-x64.exe

After downloading, it will be installed by default all the way to the final finish, and the password needs to be remembered.

Configure environment variables:

Put the path of the bin and lib folders under the PostgreSQL installation folder into the environment variable Path, separated by;

C:\Program Files\PostgreSQL\10\bin;C:\Program Files\PostgreSQL\10\lib;

Modify the configuration file:

Enter the installation path C:\Program Files\PostgreSQL\13\data, open the pg_hba.conf file, and skip to the end,

Annotate the original configuration and add the following configuration at the end,

# "local" is for Unix domain socket connections onlylocal   all             all                                     trust# IPv4 local connections:host    all             all             127.0.0.1/32            trust# IPv6 local connections:host    all             all             ::1/128                 trust

run:

After saving, cmd enters the installation path C:\Program Files\PostgreSQL\13\bin, execute the following command,

初始化pgsql:initdb.exe -D ../data 启动pgsql,启动完以后不要关闭窗口pg_ctl.exe start -D ..\data

verification:

Enter the installation path C:\Program Files\PostgreSQL\13\scripts, select the file runpsql.bat, right-click to run as an administrator,

Enter directly, if the above situation occurs, the operation is successful.

timescaledb-postgresql-13_2.2.1-windows-amd64 installation

Download link: https://timescalereleases.blob.core.windows.net/windows/timescaledb-postgresql-13_2.2.1-windows-amd64.zip

After downloading, unzip it, put the unzipped dll file in the postgresql installation directory C:\Program Files\PostgreSQL\13\lib, and put the sql file and control file in the postgresql installation directory C:\Program Files\PostgreSQL\13 \share\extension directory,

Modify the postgresql configuration file, C:\Program Files\PostgreSQL\13\data\postgresql.conf, add configuration at the end:

shared_preload_libraries = 'timescaledb'

Load extended timescaledb

Enter the installation directory C:\Program Files\PostgreSQL\13\scripts, select runpsql.bat, right click to run as an administrator, and enter the command execution mode to execute.

create extension timescaledb;

The following content will appear after successful execution,

cmd into the postgresql installation directory C:\Program Files\PostgreSQL\13\bin, restart the postgresql service,

pg_ctl.exe stop -D ..\data  pg_ctl.exe start -D ..\data

Deploy ThingsBoard

Win search pgAdmin and enter the software -> enter the password, and then double-click servers to create the database thingsboard,

cmd enters the thingsboard directory, execute,

install --loadDemo

After the execution is successful,

net start thingsboard

The following content shows that the deployment is successful,

You can view it by visiting the http://localhost:8080/login address.