There are two possibilities to install thin-edge.io, the easiest way is to use the installation script with this command:
curl -fsSL https://raw.githubusercontent.com/thin-edge/thin-edge.io/main/get-thin-edge_io.sh | sudo sh -s
You can execute that command on your device and it will do all required steps for an initial setup.
If you prefer to have a little more control over the installation or the script did not work for you, please go on with the following steps.
To install thin edge package it is required to use curl
to download the package and dpkg
to install it.
thin-edge.io has single dependency and it is mosquitto
used for communication southbound and northbound e.g. southbound, devices can publish measurements; northbound, gateway may relay messages to cloud.
mosquitto
can be installed with your package manager. For apt the command may look as following:
apt install mosquitto
Note: Some OSes may require you to use
sudo
to install packages.
sudo apt install mosquitto
When all dependencies are in place you can proceed with installation of thin-edge.io cli
and thin-edge.io mapper
service.
If you already have thin-edge.io
on your device to upgrade thin-edge.io
follow the steps below, there is no need to remove old version.
Note: To successfully upgrade
thin-edge.io
all thin-edge.io components should be stopped, eg:tedge-mapper
andtedge-agent
:systemctl stop tedge-mapper-c8y systemctl stop tedge-agent
thin-edge.io package is in thin-edge.io repository on GitHub: thin-edge.io.
To download the package from github repository use following command (use desired version):
curl -LJO https://github.com/thin-edge/thin-edge.io/releases/download/<package>_<version>_<arch>.deb
where:
version
-> thin-edge.io version in x.x.x format
arch
-> architecture type (amd64, armhf, arm64)
Eg:
curl -LJO https://github.com/thin-edge/thin-edge.io/releases/download/0.5.0/tedge_0.5.0_armhf.deb
and for mapper
:
curl -LJO https://github.com/thin-edge/thin-edge.io/releases/download/0.5.0/tedge_mapper_0.5.0_armhf.deb
Now, we have downloaded the package we can proceed to installation. First we will install cli tool tedge
.
Note: Some OSes may require you to use
sudo
to install packages and therefore all following commands may needsudo
.
To install tedge
use following command:
dpkg -i tedge_<version>_<arch>.deb
Eg:
dpkg -i tedge_0.5.0_armhf.deb
To install mapper for thin-edge.io do:
dpkg -i tedge_mapper_<version>_<arch>.deb
Eg:
dpkg -i tedge_mapper_0.5.0_armhf.deb
During the installation process, a tedge-users
group is automatically created,
in order to ease the administration of who can use the sudo tedge
command on the device.
Indeed, the tedge
command needs to be run using sudo
.
So, unless all the users are granted sudo privileges, you have to add a user to the tedge-users
group for that user to be able to use tedge
.
Run this command to add a user to the group.
sudo adduser <user> tedge-users