立即试用 商务报价
网关
安装 > Installation from pip

IoT Gateway Pip installation.

Package manager installation

To install ThingsBoard Gateway as python module, you should follow steps below:

1. Install required libraries to the system with apt:

1
sudo apt install python3-dev python3-pip libglib2.0-dev 

2. Install ThingsBoard Gateway module with pip:

1
sudo pip3 install thingsboard-gateway

3. Download example of configs, create log folder:

  • Downloading configs example:
1
wget https://github.com/thingsboard/thingsboard-gateway/releases/download/2.0/configs.tar.gz
  • Make directory for configs:
    1
    
    sudo mkdir /etc/thingsboard-gateway
    
  • Make directory for logs:
    1
    
    sudo mkdir /var/log/thingsboard-gateway
    
  • Unpack configs:
    1
    
    sudo tar -xvzf configs.tar.gz -C /etc/thingsboard-gateway
    

4. Set permission to the folders:

  • For logs folder:
    1
    
    sudo chown YOUR_USER:YOUR_USER -R /var/log/thingsboard-gateway
    
  • For configs folder
    1
    
    sudo chown YOUR_USER:YOUR_USER -R /etc/thingsboard-gateway
    

    Where YOUR_USER is a user who will run the gateway.

5. Check installation you can with command (You will get errors about connection, because you don’t configure gateway for yourself. For configuration please use Configuration guide):

1
thingsboard-gateway