Installing Thingsboard on Clear Linux Latest
Introduction
Thingsboard is an open-source platform that helps you to collect, analyze and visualize IoT data. In this tutorial, we will learn how to install Thingsboard on Clear Linux Latest.
Prerequisites
Before we start with the installation, make sure that you have the following requirements:
- A server running Clear Linux Latest.
- Java 8 or later version installed on your system.
- Docker installed with the latest version.
Step 1: Install PostgreSQL
To start with the installation process, we need to install the PostgreSQL database because it is required for Thingsboard to store data.
First, update the system package index and install PostgreSQL by running the following command in your terminal:
sudo swupd update sudo swupd bundle-add postgresqlAfter the installation completes, start and enable the PostgreSQL service using the following command:
sudo systemctl start postgresql.service sudo systemctl enable postgresql.serviceBy default, PostgreSQL installation creates a user named
postgresand sets a password for it. Now, we need to log in to the PostgreSQL shell as the userpostgresby running the following command:sudo -i -u postgres psqlNow set a password for the user
postgresby running the following command:\password postgresType the new password for the user
postgres.After setting the password, create a new database for Thingsboard by running the following command:
CREATE DATABASE thingsboard;Exit from PostgreSQL shell by typing
\q.
Step 2: Install Thingsboard
Now, we can start with the installation of Thingsboard. The following steps guide you through the installation process:
First, clone the Thingsboard repository from Github by running the following command:
git clone https://github.com/thingsboard/thingsboard.gitChange your working directory to the Thingsboard root folder:
cd thingsboardCheckout the latest release branch by running the following command:
git checkout release-3.3Now, build the Thingsboard Docker image by running the following command:
sudo docker build -t thingsboard:latest -f docker/Dockerfile.rpm .After the image build completes, start the Docker container by running the following command:
sudo docker run -it --name thingsboard -p 8080:9090 -p 1883:1883 -p 5683:5683/udp thingsboard:latestThingsboard now runs on port 8080 of your server, and you can browse the Thingsboard UI by opening the following URL in your web browser:
http://<your server IP address>:8080After opening the URL, you will see the Thingsboard login page. Use the following credentials to log in:
Username: [email protected] Password: sysadmin
Congratulations! You have successfully installed and set up Thingsboard on Clear Linux Latest. You can now start collecting and visualizing IoT data in Thingsboard.