Get Started with TDengine Using an Installation Package
You can install TDengine on a local machine and perform some basic tests to verify its performance. The TDengine OSS server can be installed on Linux and macOS, and the TDengine OSS client can be installed on Linux, macOS, and Windows.
To install TDengine in a Docker container instead of on your machine, see Get Started with TDengine in Docker.
Before You Begin
- Verify that your machine meets the minimum system requirements for TDengine. For more information, see Supported Platforms and System Requirements.
- (Windows only) Verify that the latest version of the Microsoft Visual C++ Redistributable is installed on your machine. To download the redistributable package, see Microsoft Visual C++ Redistributable latest supported downloads.
Procedure
The TDengine OSS installation package is provided for Linux users in .deb, .rpm, and .tar.gz format and can also be installed via APT from our repository. Installation packages are also provided for macOS (client and server) and Windows (client only).
-
Select the appropriate package for your machine and follow the steps to install TDengine.
- .deb
- .rpm
- .tar.gz
- APT
- Windows
- macOS
-
Download the .deb installation package:
Download TDengineEnter your information to receive a download linkI agree to receive communications from TDengine and to allow TDengine to store and process my personal data. -
Run the following command to install TDengine:
sudo dpkg -i TDengine-server-<version>-Linux-x64.deb
Replace
<version>
with the version of the package that you downloaded.
-
Download the .rpm installation package:
Download TDengineEnter your information to receive a download linkI agree to receive communications from TDengine and to allow TDengine to store and process my personal data. -
Run the following command to install TDengine:
sudo rpm -ivh TDengine-server-<version>-Linux-x64.rpm
Replace
<version>
with the version of the package that you downloaded.
-
Download the desired .tar.gz package from the following list:
Download TDengineEnter your information to receive a download linkI agree to receive communications from TDengine and to allow TDengine to store and process my personal data. -
Run the following command to decompress the package:
tar -zxvf TDengine-server-<version>-Linux-x64.tar.gz
Replace
<version>
with the version of the package that you downloaded. -
In the directory where you decompressed the package, run the following command to install TDengine:
sudo ./install.sh
noteThe
install.sh
script requires you to enter configuration information in the terminal. For a non-interactive installation, run./install.sh -e no
. You can run./install.sh -h
for detailed information about all parameters.
-
Configure the package repository:
wget -qO - http://repos.taosdata.com/tdengine.key | sudo apt-key add -
echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-stable stable main" | sudo tee /etc/apt/sources.list.d/tdengine-stable.list -
Update the list of available packages and install TDengine.
sudo apt-get update
apt-cache policy tdengine
sudo apt-get install tdengine
noteThis procedure installs the TDengine OSS client on Windows. The TDengine OSS server does not support Windows.
- Download the Windows installation package:
Download TDengineEnter your information to receive a download linkI agree to receive communications from TDengine and to allow TDengine to store and process my personal data.
- Run the installation package to install TDengine.
-
Download the desired installation package from the following list:
Download TDengineEnter your information to receive a download linkI agree to receive communications from TDengine and to allow TDengine to store and process my personal data. -
Run the installation package to install TDengine.
noteIf the installation is blocked, right-click on the package and choose Open.
-
When installing the first node and prompted with
Enter FQDN:
, you do not need to input anything. Only when installing the second or subsequent nodes do you need to input the FQDN of any available node in the existing cluster to join the new node to the cluster. Alternatively, you can configure it in the new node's configuration file before starting. -
Select your operating system and follow the steps to start TDengine services.
- Linux
- macOS
Run the following command to start all TDengine services:
sudo start-all.sh
Alternatively, you can manage specific TDengine services through systemd:
sudo systemctl start taosd
sudo systemctl start taosadapter
sudo systemctl start taoskeeper
sudo systemctl start taos-explorernoteIf your machine does not support systemd, you can manually run the TDengine services located in the
/usr/local/taos/bin
directory.Run the following command to start all TDengine services:
sudo start-all.sh
Alternatively, you can manage specific TDengine services with the
launchctl
command:sudo launchctl start com.tdengine.taosd
sudo launchctl start com.tdengine.taosadapter
sudo launchctl start com.tdengine.taoskeeper
sudo launchctl start com.tdengine.taos-explorerYou can now work with TDengine on your local machine. For example, you can run the
taos
command to open the TDengine command-line interface.
What to Do Next
Test Data Ingestion
Your TDengine installation includes taosBenchmark, a tool specifically designed to test TDengine’s performance. taosBenchmark can simulate data generated by many devices with a wide range of configuration options so that you can perform tests on sample data similar to your real-world use cases. For more information about taosBenchmark, see taosBenchmark.
Perform the following steps to use taosBenchmark to test TDengine's ingestion performance on your machine:
-
Run taosBenchmark with the default settings:
taosBenchmark -y
taosBenchmark automatically creates the test
database and the meters
supertable inside that database. This supertable contains 10,000 subtables, named d0
to d9999
, with each subtable containing 10,000 records. Each record includes the following four metrics:
ts
(timestamp), ranging from2017-07-14 10:40:00 000" to "2017-07-14 10:40:09 999
current
voltage
phase
Each subtable also has the following two tags:
groupId
, ranging from1
to10
location
, indicating a city and state such asCalifornia.Campbell
orCalifornia.Cupertino
When the ingestion process is finished, taosBenchmark outputs the time taken to ingest the specified sample data. From this, you can estimate how TDengine would perform on your system in a production environment.
Test Data Querying
After inserting data with taosBenchmark as described above, you can use the TDengine CLI to test TDengine's query performance on your machine:
-
Start the TDengine CLI:
taos
-
Query the total number of records in the
meters
supertable:SELECT COUNT(*) FROM test.meters;
-
Query the average, maximum, and minimum values of 100 million records:
SELECT AVG(current), MAX(voltage), MIN(phase) FROM test.meters;
-
Query the total number of records where the value of the
location
tag isCalifornia.SanFrancisco
:SELECT COUNT(*) FROM test.meters WHERE location = "California.SanFrancisco";
-
Query the average, maximum, and minimum values of all records where the value of the
groupId
tag is10
:SELECT AVG(current), MAX(voltage), MIN(phase) FROM test.meters WHERE groupId = 10;
-
Calculate the average, maximum, and minimum values for the
d1001
table every 10 seconds:SELECT _wstart, AVG(current), MAX(voltage), MIN(phase) FROM test.d1001 INTERVAL(10s);