Install and Uninstall

This document gives more information about installing, uninstalling, and upgrading TDengine.

Install

About details of installing TDenine, please refer to Installation Guide.

Uninstall

  • Uninstall apt-get
  • Uninstall Deb
  • Uninstall RPM
  • Uninstall tar.gz
  • Windows uninstall

Apt-get package of TDengine can be uninstalled as below:

  1. $ sudo apt-get remove tdengine
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following packages will be REMOVED:
  6. tdengine
  7. 0 upgraded, 0 newly installed, 1 to remove and 18 not upgraded.
  8. After this operation, 68.3 MB disk space will be freed.
  9. Do you want to continue? [Y/n] y
  10. (Reading database ... 135625 files and directories currently installed.)
  11. Removing tdengine (3.0.0.0) ...
  12. TDengine is removed successfully!

Apt-get package of taosTools can be uninstalled as below:

  1. $ sudo apt remove taostools
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following packages will be REMOVED:
  6. taostools
  7. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  8. After this operation, 68.3 MB disk space will be freed.
  9. Do you want to continue? [Y/n]
  10. (Reading database ... 147973 files and directories currently installed.)
  11. Removing taostools (2.1.2) ...

Deb package of TDengine can be uninstalled as below:

  1. $ sudo dpkg -r tdengine
  2. (Reading database ... 137504 files and directories currently installed.)
  3. Removing tdengine (3.0.0.0) ...
  4. TDengine is removed successfully!

Deb package of taosTools can be uninstalled as below:

  1. $ sudo dpkg -r taostools
  2. (Reading database ... 147973 files and directories currently installed.)
  3. Removing taostools (2.1.2) ...

RPM package of TDengine can be uninstalled as below:

  1. $ sudo rpm -e tdengine
  2. TDengine is removed successfully!

RPM package of taosTools can be uninstalled as below:

  1. sudo rpm -e taostools
  2. taosToole is removed successfully!

tar.gz package of TDengine can be uninstalled as below:

  1. $ rmtaos
  2. TDengine is removed successfully!

tar.gz package of taosTools can be uninstalled as below:

  1. $ rmtaostools
  2. Start to uninstall taos tools ...
  3. taos tools is uninstalled successfully!

Run C:\TDengine\unins000.exe to uninstall TDengine on a Windows system.

Install and Uninstall - 图1info
  • We strongly recommend not to use multiple kinds of installation packages on a single host TDengine. The packages may affect each other and cause errors.

  • After deb package is installed, if the installation directory is removed manually, uninstall or reinstall will not work. This issue can be resolved by using the command below which cleans up TDengine package information.

    1. $ sudo rm -f /var/lib/dpkg/info/tdengine*

You can then reinstall if needed.

  • After rpm package is installed, if the installation directory is removed manually, uninstall or reinstall will not work. This issue can be resolved by using the command below which cleans up TDengine package information.

    1. $ sudo rpm -e --noscripts tdengine

You can then reinstall if needed.

Uninstalling and Modifying Files

  • When TDengine is uninstalled, the configuration /etc/taos/taos.cfg, data directory /var/lib/taos, log directory /var/log/taos are kept. They can be deleted manually with caution, because data can’t be recovered. Please follow data integrity, security, backup or relevant SOPs before deleting any data.

  • When reinstalling TDengine, if the default configuration file /etc/taos/taos.cfg exists, it will be kept and the configuration file in the installation package will be renamed to taos.cfg.orig and stored at /usr/local/taos/cfg to be used as configuration sample. Otherwise the configuration file in the installation package will be installed to /etc/taos/taos.cfg and used.

Upgrade

There are two aspects in upgrade operation: upgrade installation package and upgrade a running server.

To upgrade a package, follow the steps mentioned previously to first uninstall the old version then install the new version.

Upgrading a running server is much more complex. First please check the version number of the old version and the new version. The version number of TDengine consists of 4 sections, only if the first 3 sections match can the old version be upgraded to the new version. The steps of upgrading a running server are as below:

  • Stop inserting data
  • Make sure all data is persisted to disk
  • Stop the cluster of TDengine
  • Uninstall old version and install new version
  • Start the cluster of TDengine
  • Execute simple queries, such as the ones executed prior to installing the new package, to make sure there is no data loss
  • Run some simple data insertion statements to make sure the cluster works well
  • Restore business services
Install and Uninstall - 图2warning

TDengine doesn’t guarantee any lower version is compatible with the data generated by a higher version, so it’s never recommended to downgrade the version.