安装

ThingsBoard安装和配置文档。

升级说明

  • 升级到1.0.3
  • 升级到1.1.0
  • 升级到1.2.0
  • 升级到1.2.1
  • 升级到1.2.2
  • 升级到1.2.3
  • 升级到1.3.0
  • 升级到1.3.1
  • 升级到1.4.0
  • 升级到2.0.0
  • 升级到2.0.1
  • 升级到2.0.2
  • 升级到2.0.3
  • 升级到2.1.0
  • 升级到2.2.0
  • 升级到2.3.0
  • 升级到2.3.1
  • Upgrading to 3.0.1
  • Upgrading to 3.0
  • Upgrading to 2.5.2
  • Upgrading to 2.5.1
  • Upgrading to 2.5
  • Upgrading to 2.4.3
  • 升级到2.4.0
  • Upgrading to 2.4.2.1
  • 升级到2.4.1
  • Upgrading to 2.4.1 <<<<<<< HEAD
  • </ul> ## 升级到1.0.3 这些步骤适用于1.0、1.0.1和1.0.2 ThingsBoard版本。 #### ThingsBoard软件包下载
    resources/1.0.3/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.0.3/thingsboard-1.0.3.deb
    
    resources/1.0.3/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.0.3/thingsboard-1.0.3.rpm
    
    #### ThingsBoard服务升级
    resources/1.0.3/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-1.0.3.deb
    
    resources/1.0.3/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-1.0.3.rpm
    
    #### 数据库升级 仅当从1.0或1.0.1版本升级时,才需要执行此步骤。 请按照以下说明更新你的单节点实例: ```bash # Download upgrade scripts $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.0.3/upgrade_1.0_1.0.2.sh $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.0.3/system_widgets_1.0_1.0.2.cql # Launch main script $ chmod +x upgrade_1.0_1.0.2.sh $ ./upgrade_1.0_1.0.2.sh ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ## 升级到1.1.0 这些步骤适用于1.0.3 ThingsBoard版本。 #### ThingsBoard软件包下载
    resources/1.1.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.1/thingsboard-1.1.deb
    
    resources/1.1.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.1/thingsboard-1.1.rpm
    
    #### ThingsBoard服务升级 #### 数据库升级 请按照以下说明更新你的单节点实例: ```bash # Download upgrade scripts $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.1.0/upgrade_1.0.3_1.1.0.sh $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.1.0/system_widgets_1.0.3_1.1.0.cql # Launch main script $ chmod +x upgrade_1.0.3_1.1.0.sh $ ./upgrade_1.0.3_1.1.0.sh ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ## 升级到1.2.0 这些步骤适用于1.1.0 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.2.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2/thingsboard-1.2.deb
    
    resources/1.2.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2/thingsboard-1.2.rpm
    
    #### ThingsBoard服务升级 #### 数据库升级 ```bash # Download upgrade scripts $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.0/upgrade_1.1.0_1.2.0.sh $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.0/system_widgets.cql # Launch main script $ chmod +x upgrade_1.1.0_1.2.0.sh $ ./upgrade_1.1.0_1.2.0.sh ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.2.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.2/thingsboard-windows-1.2.zip). #### ThingsBoard服务升级 * 对ThingsBoard安装目录中的旧版配置进行备份 * 通过运行ThingsBoard安装目录中的**uninstall.bat**来卸载ThingsBoard服务的先前版本。 **注意** 上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>uninstall.bat ``` * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 运行** install.bat **脚本将新版本的ThingsBoard安装为Windows服务。 ```text C:\thingsboard>install.bat ``` #### 数据库升级 * 将升级脚本下载到某些文件夹: * [upgrade_1.1.0_1.2.0.bat](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.0/upgrade_1.1.0_1.2.0.bat) * [system_widgets.cql](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.0/system_widgets.cql) * 执行**upgrade_1.1.0_1.2.0.bat **(**注意**此脚本应使用管理角色执行) ```text upgrade_1.1.0_1.2.0.bat ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到1.2.1 这些步骤适用于1.2.0 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.2.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2.1/thingsboard-1.2.1.deb
    
    resources/1.2.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2.1/thingsboard-1.2.1.rpm
    
    #### ThingsBoard服务升级
    resources/1.2.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-1.2.1.deb
    
    resources/1.2.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-1.2.1.rpm
    
    #### 数据库升级 ```bash # Download upgrade scripts $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.1/upgrade_1.2.0_1.2.1.sh $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.1/schema_update.cql $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.1/system_widgets.cql # Launch main script $ chmod +x upgrade_1.2.0_1.2.1.sh $ ./upgrade_1.2.0_1.2.1.sh ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.2.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.2.1/thingsboard-windows-1.2.1.zip). #### ThingsBoard服务升级 * 对ThingsBoard安装目录中的旧版配置进行备份 * 通过运行ThingsBoard安装目录中的**uninstall.bat**来卸载ThingsBoard服务的先前版本。 **注意** 上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>uninstall.bat ``` * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 运行** install.bat **脚本将新版本的ThingsBoard安装为Windows服务。 ```text C:\thingsboard>install.bat ``` #### 数据库升级 * 将升级脚本下载到某些文件夹: * [upgrade_1.2.0_1.2.1.bat](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.1/upgrade_1.2.0_1.2.1.bat) * [schema_update.cql](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.1/schema_update.cql) * [system_widgets.cql](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.1/system_widgets.cql) * Execute **upgrade_1.2.0_1.2.1.bat** (**NOTE** This script should be executed using Administrative Role) ```text upgrade_1.2.0_1.2.1.bat ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到1.2.2 这些步骤适用于1.2.1 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.2.2/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2.2/thingsboard-1.2.2.deb
    
    resources/1.2.2/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2.2/thingsboard-1.2.2.rpm
    
    #### ThingsBoard服务升级
    resources/1.2.2/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-1.2.2.deb
    
    resources/1.2.2/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-1.2.2.rpm
    
    #### 数据库升级 ```bash # Download upgrade scripts $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.2/upgrade_1.2.1_1.2.2.sh $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.2/system_widgets.cql # Launch main script $ chmod +x upgrade_1.2.1_1.2.2.sh $ ./upgrade_1.2.1_1.2.2.sh ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.2.2.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.2.2/thingsboard-windows-1.2.2.zip). #### ThingsBoard服务升级 * 对ThingsBoard安装目录中的旧版配置进行备份 * 通过运行ThingsBoard安装目录中的**uninstall.bat**来卸载ThingsBoard服务的先前版本。 **注意** 上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>uninstall.bat ``` * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 运行** install.bat **脚本将新版本的ThingsBoard安装为Windows服务。 ```text C:\thingsboard>install.bat ``` #### 数据库升级 * 将升级脚本下载到某些文件夹: * [upgrade_1.2.1_1.2.2.bat](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.2/upgrade_1.2.1_1.2.2.bat) * [system_widgets.cql](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.2/system_widgets.cql) * Execute **upgrade_1.2.1_1.2.2.bat** (**NOTE** This script should be executed using Administrative Role) ```text upgrade_1.2.1_1.2.2.bat ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到1.2.3 These steps are applicable for 1.2.2 ThingsBoard version. ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.2.3/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2.3/thingsboard-1.2.3.deb
    
    resources/1.2.3/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.2.3/thingsboard-1.2.3.rpm
    
    #### ThingsBoard服务升级
    resources/1.2.3/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-1.2.3.deb
    
    resources/1.2.3/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-1.2.3.rpm
    
    #### 数据库升级 ```bash # Download upgrade scripts $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.3/upgrade_1.2.2_1.2.3.sh $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.3/schema_update.cql $ wget https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.3/system_widgets.cql # Launch main script $ chmod +x upgrade_1.2.2_1.2.3.sh $ ./upgrade_1.2.2_1.2.3.sh ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.2.3.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.2.3/thingsboard-windows-1.2.3.zip). #### ThingsBoard服务升级 * 对ThingsBoard安装目录中的旧版配置进行备份 * 通过运行ThingsBoard安装目录中的**uninstall.bat**来卸载ThingsBoard服务的先前版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>uninstall.bat ``` * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 运行**install.bat**脚本将新版本的ThingsBoard安装为Windows服务。 ```text C:\thingsboard>install.bat ``` #### 数据库升级 * 将升级脚本下载到某些文件夹: * [upgrade_1.2.2_1.2.3.bat](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.3/upgrade_1.2.2_1.2.3.bat) * [schema_update.cql](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.3/schema_update.cql) * [system_widgets.cql](https://raw.githubusercontent.com/thingsboard/thingsboard.github.io/master/docs/user-guide/install/resources/1.2.3/system_widgets.cql) * 执行**upgrade_1.2.2_1.2.3.bat**(**注意**此脚本应使用管理角色执行) ```text upgrade_1.2.2_1.2.3.bat ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到1.3.0 这些步骤适用于1.2.3 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.3.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.3/thingsboard-1.3.deb
    
    resources/1.3.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.3/thingsboard-1.3.rpm
    
    #### ThingsBoard服务升级 **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=1.2.3 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.3.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.3/thingsboard-windows-1.3.zip). #### ThingsBoard服务升级 * 如果正在运行,则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=1.2.3 ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到1.3.1 这些步骤适用于1.3.0 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.3.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.3.1/thingsboard-1.3.1.deb
    
    resources/1.3.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.3.1/thingsboard-1.3.1.rpm
    
    #### ThingsBoard服务升级
    resources/1.3.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-1.3.1.deb
    
    resources/1.3.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-1.3.1.rpm
    
    **注意:**软件包安装程序可能会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件**/etc/thingsboard/conf/thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=1.3.0 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.3.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.3.1/thingsboard-windows-1.3.1.zip). #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=1.3.0 ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到1.4.0 这些步骤适用于1.3.1 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/1.4.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.4/thingsboard-1.4.deb
    
    resources/1.4.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v1.4/thingsboard-1.4.rpm
    
    #### ThingsBoard服务升级 **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=1.3.1 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-1.4.zip](https://github.com/thingsboard/thingsboard/releases/download/v1.4/thingsboard-windows-1.4.zip). #### ThingsBoard服务升级 * 如果正在运行,则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=1.3.1 ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到2.0.0 这些步骤适用于1.4.0 ThingsBoard版本。 ### Ubuntu/CentOS

    重要说明


    请注意在升级过程中旧规则和插件将从您的ThingsBoard实例中完全删除

    旧的规则和插件功能被新的规则引擎组件(规则链和规则节点)取代。

    如果已配置规则或插件,则需要在执行升级之前使用导出功能备份它们。 升级后,您将需要配置新的规则链,以还原由旧规则/插件执行的应用程序逻辑。

    有关详细信息,请参阅新规则引擎文档。

    #### ThingsBoard软件包下载
    resources/2.0.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.0/thingsboard-2.0.deb
    
    resources/2.0.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.0/thingsboard-2.0.rpm
    
    #### ThingsBoard服务升级 **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=1.4.0 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows

    重要说明


    请注意在升级过程中旧规则和插件将从您的ThingsBoard实例中完全删除

    旧的规则和插件功能被新的规则引擎组件(规则链和规则节点)取代。

    如果已配置规则或插件,则需要在执行升级之前使用导出功能备份它们。 升级后,您将需要配置新的规则链,以还原由旧规则/插件执行的应用程序逻辑。

    有关详细信息,请参阅新规则引擎文档。

    #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.0.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.0/thingsboard-windows-2.0.zip). #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=1.4.0 ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到2.0.1 这些步骤适用于2.0.0 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/2.0.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.0.1/thingsboard-2.0.1.deb
    
    resources/2.0.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.0.1/thingsboard-2.0.1.rpm
    
    #### ThingsBoard服务升级
    resources/2.0.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.0.1.deb
    
    resources/2.0.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.0.1.rpm
    
    **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.0.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.0.1/thingsboard-windows-2.0.1.zip). #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` #### 启动服务 <<<<<<< HEAD ```text net start thingsboard ``` ## 升级到2.0.2 这些步骤适用于2.0.1 ThingsBoard版本。 ### Ubuntu/CentOS #### ThingsBoard软件包下载
    resources/2.0.2/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.0.2/thingsboard-2.0.2.deb
    
    resources/2.0.2/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.0.2/thingsboard-2.0.2.rpm
    
    #### ThingsBoard服务升级
    resources/2.0.2/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.0.2.deb
    
    resources/2.0.2/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.0.2.rpm
    
    **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows #### ThingsBoard软件包下载 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.0.2.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.0.2/thingsboard-windows-2.0.2.zip). #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` #### 启动服务 ```text net start thingsboard ``` ## 升级到2.0.3 这些步骤适用于2.0.2 ThingsBoard版本。 ======= ======= ## Upgrading to 3.1.1 {#upgrading-to-311} ### Ubuntu/CentOS {#ubuntucentos-311} **NOTE**: These upgrade steps are applicable for ThingsBoard version 3.1. In order to upgrade to 3.1.1 you need to [**upgrade to 3.1 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-31). #### ThingsBoard package download
    resources/3.1.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.1.1/thingsboard-3.1.1.deb
    
    resources/3.1.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.1.1/thingsboard-3.1.1.rpm
    
    #### ThingsBoard service upgrade
    resources/3.1.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-3.1.1.deb
    
    resources/3.1.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-3.1.1.rpm
    
    **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.ts.type** parameter value (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` Execute regular upgrade script: ```bash # Execute regular upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.1.0 ``` #### Start the service ```bash $ sudo service thingsboard start ``` ### Windows {#windows-311} **NOTE**: These upgrade steps are applicable for ThingsBoard version 3.1. In order to upgrade to 3.1.1 you need to [**upgrade to 3.1 first**](/docs/user-guide/install/upgrade-instructions/#windows-31). #### ThingsBoard package download Download ThingsBoard installation archive for Windows: [thingsboard-windows-3.1.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v3.1.1/thingsboard-windows-3.1.1.zip). #### ThingsBoard service upgrade * Stop ThingsBoard service if it is running. ```text net stop thingsboard ``` * Make a backup of previous ThingsBoard configuration located in \<ThingsBoard install dir\>\conf (for ex. C:\thingsboard\conf). * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please make sure that you set **database.ts.type** parameter value (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. **NOTE** Scripts listed above should be executed using Administrator Role. Execute regular upgrade script: ```text C:\thingsboard>upgrade.bat --fromVersion=3.1.0 ``` #### Start the service ```text net start thingsboard ``` ## Upgrading to 3.1 {#upgrading-to-31} ### Ubuntu/CentOS {#ubuntucentos-31} **NOTE**: These upgrade steps are applicable for ThingsBoard version 3.0.1. In order to upgrade to 3.1 you need to [**upgrade to 3.0.1 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-301). #### ThingsBoard package download
    resources/3.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.1/thingsboard-3.1.deb
    
    resources/3.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.1/thingsboard-3.1.rpm
    
    #### ThingsBoard service upgrade
    resources/3.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-3.1.deb
    
    resources/3.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-3.1.rpm
    
    **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.ts.type** parameter value (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` **NOTE**: Cassandra database does not support [advanced filters](/docs/user-guide/advanced-filters/). If you were using **Cassandra** database for timeseries data please make sure that **database.ts_latest.type** parameter value (in the file **/etc/thingsboard/conf/thingsboard.yml**) is "sql": ``` database: ... ts_latest: type: "${DATABASE_TS_LATEST_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` and execute the following migration script: ```bash # Execute script to migrate latest timeseries data from Cassandra to PostgreSQL $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.0.1-cassandra ``` Execute regular upgrade script: ```bash # Execute regular upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=3.0.1 ``` #### Start the service ```bash $ sudo service thingsboard start ``` ### Windows {#windows-31} **NOTE**: These upgrade steps are applicable for ThingsBoard version 3.0.1. In order to upgrade to 3.1 you need to [**upgrade to 3.0.1 first**](/docs/user-guide/install/upgrade-instructions/#windows-301). #### ThingsBoard package download Download ThingsBoard installation archive for Windows: [thingsboard-windows-3.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v3.1/thingsboard-windows-3.1.zip). #### ThingsBoard service upgrade * Stop ThingsBoard service if it is running. ```text net stop thingsboard ``` * Make a backup of previous ThingsBoard configuration located in \<ThingsBoard install dir\>\conf (for ex. C:\thingsboard\conf). * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please make sure that you set **database.ts.type** parameter value (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. **NOTE** Scripts listed above should be executed using Administrator Role. **NOTE**: If you were using **Cassandra** database for entities data execute the following migration script: ```text C:\thingsboard>upgrade.bat --fromVersion=3.0.1-cassandra ``` Execute regular upgrade script: ```text C:\thingsboard>upgrade.bat --fromVersion=3.0.1 ``` #### Start the service ```text net start thingsboard ``` ## Upgrading to 3.0.1 {#upgrading-to-301} ### Ubuntu/CentOS {#ubuntucentos-301} **NOTE**: These upgrade steps are applicable for ThingsBoard version 3.0. In order to upgrade to 3.0.1 you need to [**upgrade to 3.0 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-30).

    Important note before upgrading to ThingsBoard 3.0

    • ThingsBoard UI was rewritten from AngularJS 1.5.8 to use Angular 9.
      • What does it mean?
        • Generally speaking, it means: state of the art application, easier development of front-end elements, performance improvements and more flexibility with UI customizations.
      • How to upgrade?
        • You are safe to upgrade if you do NOT use custom widgets or custom actions in the dashboards.
        • New JS framework may not support your current code — custom widgets and custom actions, so they need to be refactored a bit. Thus we encourage you to test your customizations using our cloud environments or your dev instances.
    • Migration from pure Cassandra to Hybrid DB Approach
      • We still support Cassandra for storing telemetry data but not the entities like devices, customers, tenants, etc.
      • What does it mean?
        • This will simplify maintenance and future improvements that will enable advanced search capabilities in v3.1.
      • How to upgrade?
        • If you are using pure PostgreSQL setup or PostgreSQL (for entities) + Cassandra (for telemetry), you are not affected.
        • If you are using pure Cassandra - the upgrade procedure is automatic but takes some time. The downtime depends on the number of devices, attributes, alarms and relations. If you have less than 10 million of those entities the upgrade should take a few minutes and depends on the database performance.

    FYI: we will continue support of v2.5 until May 1st 2021, so no need to rush with the migration. Our team is ready to support you on the way, let’s make your upgrade process stressless.


    Since ThingsBoard 3.0 only PostgreSQL database is supported for entities data

    #### ThingsBoard软件包下载
    resources/3.0.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.0.1/thingsboard-3.0.1.deb
    
    resources/3.0.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.0.1/thingsboard-3.0.1.rpm
    
    #### ThingsBoard服务升级
    resources/3.0.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-3.0.1.deb
    
    resources/3.0.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-3.0.1.rpm
    
    <<<<<<< HEAD **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ======= **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.ts.type** parameter value (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: >>>>>>> master ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` **NOTE**: If you were using **Cassandra** database for entities data execute the following migration script: ```bash # Execute migration script from Cassandra to PostgreSQL $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.5.0-cassandra ``` Otherwise execute regular upgrade script: ```bash # Execute regular upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.5.0 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-301} **NOTE**: These upgrade steps are applicable for ThingsBoard version 3.0. In order to upgrade to 3.0.1 you need to [**upgrade to 3.0 first**](/docs/user-guide/install/upgrade-instructions/#windows-30).

    Important note before upgrading to ThingsBoard 3.0

    • ThingsBoard UI was rewritten from AngularJS 1.5.8 to use Angular 9.
      • What does it mean?
        • Generally speaking, it means: state of the art application, easier development of front-end elements, performance improvements and more flexibility with UI customizations.
      • How to upgrade?
        • You are safe to upgrade if you do NOT use custom widgets or custom actions in the dashboards.
        • New JS framework may not support your current code — custom widgets and custom actions, so they need to be refactored a bit. Thus we encourage you to test your customizations using our cloud environments or your dev instances.
    • Migration from pure Cassandra to Hybrid DB Approach
      • We still support Cassandra for storing telemetry data but not the entities like devices, customers, tenants, etc.
      • What does it mean?
        • This will simplify maintenance and future improvements that will enable advanced search capabilities in v3.1.
      • How to upgrade?
        • If you are using pure PostgreSQL setup or PostgreSQL (for entities) + Cassandra (for telemetry), you are not affected.
        • If you are using pure Cassandra - the upgrade procedure is automatic but takes some time. The downtime depends on the number of devices, attributes, alarms and relations. If you have less than 10 million of those entities the upgrade should take a few minutes and depends on the database performance.

    FYI: we will continue support of v2.5 until May 1st 2021, so no need to rush with the migration. Our team is ready to support you on the way, let’s make your upgrade process stressless.

    Since ThingsBoard 3.0 only PostgreSQL database is supported for entities data

    • If you are using Cassandra database for entities data please install PostgreSQL database before proceeding upgrade procedure using the following guide:
    #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.0.3.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.0.3/thingsboard-windows-2.0.3.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-3.0.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v3.0.1/thingsboard-windows-3.0.1.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 <<<<<<< HEAD * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: type: "${DATABASE_TYPE:cassandra}" # cassandra OR sql ``` #### 启动服务 ======= * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please make sure that you set **database.ts.type** parameter value (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. **NOTE** Scripts listed above should be executed using Administrator Role. **NOTE**: If you were using **Cassandra** database for entities data execute the following migration script: ```text C:\thingsboard>upgrade.bat --fromVersion=2.5.0-cassandra ``` Otherwise execute regular upgrade script: ```text C:\thingsboard>upgrade.bat --fromVersion=2.5.0 ``` #### Start the service >>>>>>> master ```text net start thingsboard ``` <<<<<<< HEAD ## 升级到2.1.0 这些步骤适用于2.0.3 ThingsBoard版本。 ======= ## Upgrading to 3.0 {#upgrading-to-30} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.4. In order to upgrade to 3.0 you need to [**upgrade to 2.5.4 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-254). ### Ubuntu/CentOS {#ubuntucentos-30}

    Important note before upgrading to ThingsBoard 3.0

    • ThingsBoard UI was rewritten from AngularJS 1.5.8 to use Angular 9.
      • What does it mean?
        • Generally speaking, it means: state of the art application, easier development of front-end elements, performance improvements and more flexibility with UI customizations.
      • How to upgrade?
        • You are safe to upgrade if you do NOT use custom widgets or custom actions in the dashboards.
        • New JS framework may not support your current code — custom widgets and custom actions, so they need to be refactored a bit. Thus we encourage you to test your customizations using our cloud environments or your dev instances.
    • Migration from pure Cassandra to Hybrid DB Approach
      • We still support Cassandra for storing telemetry data but not the entities like devices, customers, tenants, etc.
      • What does it mean?
        • This will simplify maintenance and future improvements that will enable advanced search capabilities in v3.1.
      • How to upgrade?
        • If you are using pure PostgreSQL setup or PostgreSQL (for entities) + Cassandra (for telemetry), you are not affected.
        • If you are using pure Cassandra - the upgrade procedure is automatic but takes some time. The downtime depends on the number of devices, attributes, alarms and relations. If you have less than 10 million of those entities the upgrade should take a few minutes and depends on the database performance.

    FYI: we will continue support of v2.5 until May 1st 2021, so no need to rush with the migration. Our team is ready to support you on the way, let’s make your upgrade process stressless.

    >>>>>>> master

    Since ThingsBoard 3.0 only PostgreSQL database is supported for entities data

    #### ThingsBoard软件包下载
    resources/3.0.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.0/thingsboard-3.0.deb
    
    resources/3.0.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v3.0/thingsboard-3.0.rpm
    
    #### ThingsBoard服务升级 <<<<<<< HEAD **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将database.type参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** )中设置为“cassandra”而不是“sql”,以便升级cassandra数据库: ======= **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.ts.type** parameter value (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: >>>>>>> master ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` **NOTE**: If you were using **Cassandra** database for entities data execute the following migration script: ```bash # Execute migration script from Cassandra to PostgreSQL $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.5.0-cassandra ``` Otherwise execute regular upgrade script: ```bash # Execute regular upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.5.0 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-30} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.4. In order to upgrade to 3.0 you need to [**upgrade to 2.5.4 first**](/docs/user-guide/install/upgrade-instructions/#windows-254).

    Important note before upgrading to ThingsBoard 3.0

    • ThingsBoard UI was rewritten from AngularJS 1.5.8 to use Angular 9.
      • What does it mean?
        • Generally speaking, it means: state of the art application, easier development of front-end elements, performance improvements and more flexibility with UI customizations.
      • How to upgrade?
        • You are safe to upgrade if you do NOT use custom widgets or custom actions in the dashboards.
        • New JS framework may not support your current code — custom widgets and custom actions, so they need to be refactored a bit. Thus we encourage you to test your customizations using our cloud environments or your dev instances.
    • Migration from pure Cassandra to Hybrid DB Approach
      • We still support Cassandra for storing telemetry data but not the entities like devices, customers, tenants, etc.
      • What does it mean?
        • This will simplify maintenance and future improvements that will enable advanced search capabilities in v3.1.
      • How to upgrade?
        • If you are using pure PostgreSQL setup or PostgreSQL (for entities) + Cassandra (for telemetry), you are not affected.
        • If you are using pure Cassandra - the upgrade procedure is automatic but takes some time. The downtime depends on the number of devices, attributes, alarms and relations. If you have less than 10 million of those entities the upgrade should take a few minutes and depends on the database performance.

    FYI: we will continue support of v2.5 until May 1st 2021, so no need to rush with the migration. Our team is ready to support you on the way, let’s make your upgrade process stressless.

    Since ThingsBoard 3.0 only PostgreSQL database is supported for entities data

    • If you are using Cassandra database for entities data please install PostgreSQL database before proceeding upgrade procedure using the following guide:
    #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.1/thingsboard-windows-2.1.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-3.0.zip](https://github.com/thingsboard/thingsboard/releases/download/v3.0/thingsboard-windows-3.0.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 <<<<<<< HEAD * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ======= * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please make sure that you set **database.ts.type** parameter value (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" if you are using Cassandra database for timeseries data: >>>>>>> master ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) ``` * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. **NOTE** Scripts listed above should be executed using Administrator Role. **NOTE**: If you were using **Cassandra** database for entities data execute the following migration script: ```text C:\thingsboard>upgrade.bat --fromVersion=2.5.0-cassandra ``` Otherwise execute regular upgrade script: ```text C:\thingsboard>upgrade.bat --fromVersion=2.5.0 ``` #### 启动服务 ```text net start thingsboard ``` <<<<<<< HEAD <<<<<<< HEAD ## 升级到2.2.0 这些步骤适用于2.1.0、2.1.1、2.1.2和2.1.3ThingsBoard版本。 ======= ======= ## Upgrading to 2.5.4 {#upgrading-to-254} ### Ubuntu/CentOS {#ubuntucentos-254} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.3. In order to upgrade to 2.5.4 you need to [**upgrade to 2.5.3 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-253). #### ThingsBoard package download
    resources/2.5.4/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.4/thingsboard-2.5.4.deb
    
    resources/2.5.4/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.4/thingsboard-2.5.4.rpm
    
    #### ThingsBoard service upgrade
    resources/2.5.4/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.5.4.deb
    
    resources/2.5.4/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.5.4.rpm
    
    **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. #### Start the service ```bash $ sudo service thingsboard start ``` ### Windows {#windows-254} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.3. In order to upgrade to 2.5.4 you need to [**upgrade to 2.5.3 first**](/docs/user-guide/install/upgrade-instructions/#windows-253). #### ThingsBoard package download Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.5.4.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.5.4/thingsboard-windows-2.5.4.zip). #### ThingsBoard service upgrade * Stop ThingsBoard service if it is running. ```text net stop thingsboard ``` * Make a backup of previous ThingsBoard configuration located in \<ThingsBoard install dir\>\conf (for ex. C:\thingsboard\conf). * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. #### Start the service ```text net start thingsboard ``` ## Upgrading to 2.5.3 {#upgrading-to-253} ### Ubuntu/CentOS {#ubuntucentos-253} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.2. In order to upgrade to 2.5.3 you need to [**upgrade to 2.5.2 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-252). #### ThingsBoard package download
    resources/2.5.3/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.3/thingsboard-2.5.3.deb
    
    resources/2.5.3/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.3/thingsboard-2.5.3.rpm
    
    #### ThingsBoard service upgrade
    resources/2.5.3/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.5.3.deb
    
    resources/2.5.3/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.5.3.rpm
    
    **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. #### Start the service ```bash $ sudo service thingsboard start ``` ### Windows {#windows-253} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.2. In order to upgrade to 2.5.3 you need to [**upgrade to 2.5.2 first**](/docs/user-guide/install/upgrade-instructions/#windows-252). #### ThingsBoard package download Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.5.3.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.5.3/thingsboard-windows-2.5.3.zip). #### ThingsBoard service upgrade * Stop ThingsBoard service if it is running. ```text net stop thingsboard ``` * Make a backup of previous ThingsBoard configuration located in \<ThingsBoard install dir\>\conf (for ex. C:\thingsboard\conf). * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. #### Start the service ```text net start thingsboard ``` >>>>>>> origin/master ## Upgrading to 2.5.2 {#upgrading-to-252} ### Ubuntu/CentOS {#ubuntucentos-252} >>>>>>> master **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.1. In order to upgrade to 2.5.2 you need to [**upgrade to 2.5.1 first**](/docs/user-guide/install/upgrade-instructions/#ubuntucentos-251). #### ThingsBoard软件包下载
    resources/2.5.2/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.2/thingsboard-2.5.2.deb
    
    resources/2.5.2/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.2/thingsboard-2.5.2.rpm
    
    #### ThingsBoard服务升级
    resources/2.5.2/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.5.2.deb
    
    resources/2.5.2/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.5.2.rpm
    
    <<<<<<< HEAD **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将**database.entities.type**和**database.ts.type**参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** 中)设置为“cassandra”而不是“sql”来升级你的cassandra数据库: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` ======= **NOTE:** Upgrading ThingsBoard to 2.5.2 version in case of using PostgreSQL database require to upgrade the PostgreSQL service to 11.x version. Please refer to the guides below that will describe how to upgrade your PostgreSQL service on: - [Ubuntu](https://gist.github.com/ShvaykaD/1f0e6c1321a0a2b4b9f3b9ea9ab3e8d3) - [CentOS](https://gist.github.com/ShvaykaD/313745d31a9af6db3d6a01ec9f16aac8) **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. >>>>>>> master ```bash # Finally, execute upgrade script and specify your previous ThingsBoard version. $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.3 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-252} **NOTE**: These upgrade steps are applicable for ThingsBoard version 2.5.1. In order to upgrade to 2.5.2 you need to [**upgrade to 2.5.1 first**](/docs/user-guide/install/upgrade-instructions/#windows-251). #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.2.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.2/thingsboard-windows-2.2.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.5.2.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.5.2/thingsboard-windows-2.5.2.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 <<<<<<< HEAD * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 ======= * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please note that upgrading ThingsBoard from 2.4.3 to 2.5 version in case of using PostgreSQL database require to upgrade the PostgreSQL service to 11.x version. * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. >>>>>>> master **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=2.4.3 ``` #### 启动服务 ```text net start thingsboard ``` <<<<<<< HEAD ## 升级到2.3.0 这些步骤适用于2.2.0 ThingsBoard版本。 ======= ## Upgrading to 2.5.1 {#upgrading-to-251} These steps are applicable for 2.4.3+ ThingsBoard version. >>>>>>> master ### Ubuntu/CentOS {#ubuntucentos-251} #### ThingsBoard软件包下载
    resources/2.5.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.1/thingsboard-2.5.1.deb
    
    resources/2.5.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5.1/thingsboard-2.5.1.rpm
    
    #### ThingsBoard服务升级
    resources/2.5.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.5.1.deb
    
    resources/2.5.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.5.1.rpm
    
    <<<<<<< HEAD **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将**database.entities.type**和**database.ts.type**参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** 中)设置为“cassandra”而不是“sql”来升级你的cassandra数据库: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` ======= **NOTE:** Upgrading ThingsBoard to 2.5.1 version in case of using PostgreSQL database require to upgrade the PostgreSQL service to 11.x version. Please refer to the guides below that will describe how to upgrade your PostgreSQL service on: - [Ubuntu](https://gist.github.com/ShvaykaD/1f0e6c1321a0a2b4b9f3b9ea9ab3e8d3) - [CentOS](https://gist.github.com/ShvaykaD/313745d31a9af6db3d6a01ec9f16aac8) **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. >>>>>>> master ```bash # Finally, execute upgrade script and specify your previous ThingsBoard version. $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.3 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-251} #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.3.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.3/thingsboard-windows-2.3.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.5.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.5.1/thingsboard-windows-2.5.1.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 <<<<<<< HEAD * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 ======= * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please note that upgrading ThingsBoard from 2.4.3 to 2.5 version in case of using PostgreSQL database require to upgrade the PostgreSQL service to 11.x version. * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. >>>>>>> master **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=2.4.3 ``` #### 启动服务 ```text net start thingsboard ``` <<<<<<< HEAD ## 升级到2.3.1 这些步骤适用于2.3.0 ThingsBoard版本。 ======= ## Upgrading to 2.5 >>>>>>> master These steps are applicable for 2.4.3 ThingsBoard version. ### Ubuntu/CentOS {#ubuntucentos-19} #### ThingsBoard软件包下载
    resources/2.5/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5/thingsboard-2.5.deb
    
    resources/2.5/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.5/thingsboard-2.5.rpm
    
    #### ThingsBoard服务升级
    resources/2.5/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.5.deb
    
    resources/2.5/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.5.rpm
    
    <<<<<<< HEAD **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将**database.entities.type**和**database.ts.type**参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** 中)设置为“cassandra”而不是“sql”来升级你的cassandra数据库: ======= **NOTE:** Upgrading ThingsBoard from 2.4.3 to 2.5 version in case of using PostgreSQL database require to upgrade the PostgreSQL service to 11.x version. Please refer to the guides below that will describe how to upgrade your PostgreSQL service on: - [Ubuntu](https://gist.github.com/ShvaykaD/1f0e6c1321a0a2b4b9f3b9ea9ab3e8d3) - [CentOS](https://gist.github.com/ShvaykaD/313745d31a9af6db3d6a01ec9f16aac8) **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.entities.type** and **database.ts.type** parameters values (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" in order to upgrade your cassandra database: >>>>>>> master ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records entities: type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) # note: timescale works only with postgreSQL database for DATABASE_ENTITIES_TYPE. ``` **NOTE:** If you are using **PostgreSql(Sql)** for time-series data storage before executing the upgrade script, go to the PostgreSQL terminal(psql) and follow the instructions below: ```bash # Connect to thingsboard database: \c thingsboard # Execute the next commands: # Update ts_kv table constraints: ALTER TABLE ts_kv DROP CONSTRAINT IF EXISTS ts_kv_unq_key; ALTER TABLE ts_kv DROP CONSTRAINT IF EXISTS ts_kv_pkey; ALTER TABLE ts_kv ADD CONSTRAINT ts_kv_pkey PRIMARY KEY (entity_type, entity_id, key, ts); # Update ts_kv_latest table constraints: ALTER TABLE ts_kv_latest DROP CONSTRAINT IF EXISTS ts_kv_latest_unq_key; ALTER TABLE ts_kv_latest DROP CONSTRAINT IF EXISTS ts_kv_latest_pkey; ALTER TABLE ts_kv_latest ADD CONSTRAINT ts_kv_latest_pkey PRIMARY KEY (entity_type, entity_id, key); # exit psql terminal \q ``` ```bash # Finally, execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.3 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-19} #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.3.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.3.1/thingsboard-windows-2.3.1.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.5.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.5/thingsboard-windows-2.5.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 <<<<<<< HEAD * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ======= * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please note that upgrading ThingsBoard from 2.4.3 to 2.5 version in case of using PostgreSQL database require to upgrade the PostgreSQL service to 11.x version. * Please make sure that you set **database.entities.type** and **database.ts.type** parameters values (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" in order to upgrade your cassandra database: >>>>>>> master ``` database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records entities: type: "${DATABASE_ENTITIES_TYPE:sql}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale) <<<<<<< HEAD * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 ======= # note: timescale works only with postgreSQL database for DATABASE_ENTITIES_TYPE. ``` **NOTE:** If you are using **PostgreSql(Sql)** for time-series data storage before executing the upgrade script, you need to access the psql terminal. Once you will be logged to the psql terminal, please follow the instructions below: ```bash # Connect to thingsboard database: \c thingsboard # Execute the next commands: # Update ts_kv table constraints: ALTER TABLE ts_kv DROP CONSTRAINT IF EXISTS ts_kv_unq_key; ALTER TABLE ts_kv DROP CONSTRAINT IF EXISTS ts_kv_pkey; ALTER TABLE ts_kv ADD CONSTRAINT ts_kv_pkey PRIMARY KEY (entity_type, entity_id, key, ts); # Update ts_kv_latest table constraints: ALTER TABLE ts_kv_latest DROP CONSTRAINT IF EXISTS ts_kv_latest_unq_key; ALTER TABLE ts_kv_latest DROP CONSTRAINT IF EXISTS ts_kv_latest_pkey; ALTER TABLE ts_kv_latest ADD CONSTRAINT ts_kv_latest_pkey PRIMARY KEY (entity_type, entity_id, key); # exit psql terminal \q ``` * Finally, run **upgrade.bat** script to upgrade ThingsBoard to the new version. >>>>>>> master **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=2.4.3 ``` #### 启动服务 ```text net start thingsboard ``` ## Upgrading to 2.4.3 <<<<<<< HEAD ## 升级到2.4.0 这些步骤适用于2.3.1 ThingsBoard版本。 ======= These steps are applicable for 2.4.2 and 2.4.2.1 ThingsBoard versions. >>>>>>> master ### Ubuntu/CentOS {#ubuntucentos-18} #### ThingsBoard软件包下载
    resources/2.4.3/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4.3/thingsboard-2.4.3.deb
    
    resources/2.4.3/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4.3/thingsboard-2.4.3.rpm
    
    #### ThingsBoard服务升级
    resources/2.4.3/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.4.3.deb
    
    resources/2.4.3/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.4.3.rpm
    
    **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将**database.entities.type**和**database.ts.type**参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** 中)设置为“cassandra”而不是“sql”来升级你的cassandra数据库: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.2 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-18} #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.4.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.4/thingsboard-windows-2.4.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.4.3.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.4.3/thingsboard-windows-2.4.3.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=2.4.2 ``` #### 启动服务 ```text net start thingsboard ``` <<<<<<< HEAD ## 升级到2.4.1 这些步骤适用于2.4.0 ThingsBoard版本。 ======= ## Upgrading to 2.4.2.1 These steps are applicable for 2.4.1 and 2.4.2 ThingsBoard versions. >>>>>>> master ### Ubuntu/CentOS {#ubuntucentos-17} #### ThingsBoard软件包下载
    resources/2.4.2.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4.2.1/thingsboard-2.4.2.1.deb
    
    resources/2.4.2.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4.2.1/thingsboard-2.4.2.1.rpm
    
    #### ThingsBoard服务升级
    resources/2.4.2.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.4.2.1.deb
    
    resources/2.4.2.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.4.2.1.rpm
    
    **注意:**软件包安装程序会要求你合并你的Thingsboard配置。最好使用**合并选项**以确保你之前的所有参数都不会被覆盖。 请确保将**database.entities.type**和**database.ts.type**参数值(在文件 **/etc/thingsboard/conf/thingsboard.yml** 中)设置为“cassandra”而不是“sql”来升级你的cassandra数据库: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.1 ``` #### 启动服务 ```bash $ sudo service thingsboard start ``` ### Windows {#windows-17} #### ThingsBoard软件包下载 <<<<<<< HEAD 下载适用于Windows的ThingsBoard安装包: [thingsboard-windows-2.4.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.4.1/thingsboard-windows-2.4.1.zip). ======= Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.4.2.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.4.2.1/thingsboard-windows-2.4.2.1.zip). >>>>>>> master #### ThingsBoard服务升级 * 如果正在运行则停止ThingsBoard服务。 ```text net stop thingsboard ``` * 对ThingsBoard安装目录中的旧版配置进行备份 * 删除ThingsBoard安装目录。 * 将安装档案解压缩到ThingsBoard安装目录。 * 将旧的ThingsBoard配置文件(来自第一步中的备份)与新的进行比较。 * 请确保将database.type参数值(在文件**\<ThingsBoard install dir\>\conf\thingsboard.yml**中)设置为“cassandra”而不是“sql”,以便升级cassandra数据库 ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` * 运行**upgrade.bat**脚本将ThingsBoard升级到新版本。 **注意**上面列出的脚本应使用管理员角色执行。 ```text C:\thingsboard>upgrade.bat --fromVersion=2.4.1 ``` <<<<<<< HEAD #### 启动服务 ======= #### Start the service ```text net start thingsboard ``` ## Upgrading to 2.4.1 These steps are applicable for 2.4.0 ThingsBoard version. ### Ubuntu/CentOS {#ubuntucentos-16} #### ThingsBoard package download
    resources/2.4.1/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4.1/thingsboard-2.4.1.deb
    
    resources/2.4.1/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4.1/thingsboard-2.4.1.rpm
    
    #### ThingsBoard service upgrade
    resources/2.4.1/thingsboard-ubuntu-installation.sh
    sudo dpkg -i thingsboard-2.4.1.deb
    
    resources/2.4.1/thingsboard-centos-installation.sh
    sudo rpm -Uvh thingsboard-2.4.1.rpm
    
    **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.entities.type** and **database.ts.type** parameters values (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" in order to upgrade your cassandra database: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.4.0 ``` #### Start the service ```bash $ sudo service thingsboard start ``` ### Windows {#windows-16} #### ThingsBoard package download Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.4.1.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.4.1/thingsboard-windows-2.4.1.zip). #### ThingsBoard service upgrade * Stop ThingsBoard service if it is running. ```text net stop thingsboard ``` * Make a backup of previous ThingsBoard configuration located in \<ThingsBoard install dir\>\conf (for ex. C:\thingsboard\conf). * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please make sure that you set **database.entities.type** and **database.ts.type** parameters values (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" in order to upgrade your cassandra database: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` * Run **upgrade.bat** script to upgrade ThingsBoard to the new version. **NOTE** Scripts listed above should be executed using Administrator Role. ```text C:\thingsboard>upgrade.bat --fromVersion=2.4.0 ``` #### Start the service ```text net start thingsboard ``` ## Upgrading to 2.4.0 These steps are applicable for 2.3.1 ThingsBoard version. ### Ubuntu/CentOS {#ubuntucentos-15} #### ThingsBoard package download
    resources/2.4.0/thingsboard-ubuntu-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4/thingsboard-2.4.deb
    
    resources/2.4.0/thingsboard-centos-download.sh
    wget https://github.com/thingsboard/thingsboard/releases/download/v2.4/thingsboard-2.4.rpm
    
    #### ThingsBoard service upgrade **NOTE:** Package installer will ask you to merge your thingsboard configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. Please make sure that you set **database.entities.type** and **database.ts.type** parameters values (in the file **/etc/thingsboard/conf/thingsboard.yml**) to "cassandra" instead of "sql" in order to upgrade your cassandra database: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` ```bash # Execute upgrade script $ sudo /usr/share/thingsboard/bin/install/upgrade.sh --fromVersion=2.3.1 ``` #### Start the service ```bash $ sudo service thingsboard start ``` ### Windows {#windows-15} #### ThingsBoard package download Download ThingsBoard installation archive for Windows: [thingsboard-windows-2.4.zip](https://github.com/thingsboard/thingsboard/releases/download/v2.4/thingsboard-windows-2.4.zip). #### ThingsBoard service upgrade * Stop ThingsBoard service if it is running. ```text net stop thingsboard ``` * Make a backup of previous ThingsBoard configuration located in \<ThingsBoard install dir\>\conf (for ex. C:\thingsboard\conf). * Remove ThingsBoard install dir. * Unzip installation archive to ThingsBoard install dir. * Compare your old ThingsBoard configuration files (from the backup you made in the first step) with new ones. * Please make sure that you set **database.entities.type** and **database.ts.type** parameters values (in the file **\<ThingsBoard install dir\>\conf\thingsboard.yml**) to "cassandra" instead of "sql" in order to upgrade your cassandra database: ``` database: entities: type: "${DATABASE_ENTITIES_TYPE:cassandra}" # cassandra OR sql ts: type: "${DATABASE_TS_TYPE:cassandra}" # cassandra OR sql (for hybrid mode, only this value should be cassandra) ``` * Run **upgrade.bat** script to upgrade ThingsBoard to the new version. **NOTE** Scripts listed above should be executed using Administrator Role. ```text C:\thingsboard>upgrade.bat --fromVersion=2.3.1 ``` #### Start the service >>>>>>> master ```text net start thingsboard ``` <<<<<<< HEAD ## 下一步 ======= ## Next steps >>>>>>> master - [入门指南](/docs/guides#AnchorIDGettingStartedGuides) - 这些指南提供了ThingsBoard主要功能的快速概述。 - [设备连接](/docs/guides#AnchorIDConnectYourDevice) - 了解如何根据您的连接方式或解决方案连接设备。 - [数据看板](/docs/guides#AnchorIDDataVisualization) - 这些指南包含有关如何配置复杂的ThingsBoard仪表板的说明。 - [数据处理](/docs/guides#AnchorIDDataProcessing) - 了解如何使用ThingsBoard规则引擎。 - [数据分析](/docs/guides#AnchorIDDataAnalytics) - 了解如何使用规则引擎执行基本的分析任务。 - [硬件样品](/docs/guides#AnchorIDHardwareSamples) - 了解如何将各种硬件平台连接到ThingsBoard。 - [高级功能](/docs/guides#AnchorIDAdvancedFeatures) - 了解高级ThingsBoard功能。 - [开发指南](/docs/guides#AnchorIDContribution) - 了解ThingsBoard中的贡献和开发。