Install & Deployment

openGeminiAbout 3 minAbout 803 words

This section introduces how to quickly get started with the openGemini temporal database. For non-production environments, you can choose to deploy the openGemini temporal database by one of the following ways.

This guide takes standalone deployment as an example. To learn about cluster deployment, please click on production_deployment_using_gemix to view the details.


  1. Go to GitHub Releaseopen in new window to copy the link of the latest version.

    Please replace <version> with the version of downloaded installation package.

    > wget<version>/openGemini-<version>-linux-amd64.tar.gz

    Manually downloading the corresponding installation package is also OK.

  2. Move to the directory of the installation package, use tar to unzip.

    > mkdir openGemini
    > tar -zxvf openGemini-<version>-linux-amd64.tar.gz -C openGemini

    ts-server is the the standalone version of binary system. openGemini.singlenode.conf is the configuration file which adapts to ts-server.


Move to the directory where ts-server is saved, run



If v1.0.1 and version before, running ts-server equires specifying a configuration file to start:

./ts-server -config /path/to/openGemini.singlenode.conf

To start in the background:

nohup ./ts-server > server_extra.log 2>&1 &

Command Line (ts-cli)

To facilitate the execution of various queries in the database, openGemini provides a command-line application (hereinafter referred to as openGemini CLI) ts cli. To enter the openGemini command line, simply enter the directory where ts-cli is located and execute ts-cli in the terminal.

> ./ts-cli


Connect to in default. Connect to other host by the following command:

> ./ts-cli -host -port 8086

For more usage, please use the following command to explore on your own:

> ./ts-cli -h

Basic Operations

Create a database

> create database db0

Look up the database

> show databases


> create database db0
Elapsed: 1.446074ms
> show databases
name: databases
| name |
| db0  |
1 columns, 1 rows in set

Elapsed: 2.178147ms

Use the database

> use db0

Write in data

> insert cpu_load,host="server-01",region="west_cn" value=75.3

Look up table

> show measurements

Look up data

> select * from cpu_load


> use db0
Elapsed: 251ns
> insert cpu_load,host="server-01",region="west_cn" value=75.3
Elapsed: 162.328339ms
> show measurements
name: measurements
| name     |
| cpu_load |
| mst      |
1 columns, 2 rows in set

Elapsed: 13.374945ms
> select * from cpu_load
name: cpu_load
| time                | host        | region    | value |
| 1681483835745490423 | "server-01" | "west_cn" | 75.3  |
4 columns, 1 rows in set

Elapsed: 3.259995ms


ts-server is a standalone binary file of OpenGemini, which can be simply understood as ts-server consisted of ats-sql,ats-meta and a ts-store. Attention:

  1. If the default configuration cannot meet the requirements, configuration file openGemini.singlenode.conf is needed to start. For the complete configuration items and meanings, please refer to Management - Configuration Items.
  2. The data and logs in the default configuration file are saved in /tmp/openGemini by default. It is recommended to replace them with another directory to ensure sufficient storage space. If you use scripts/ to start, you also need to modify /tmp/ in the script accordingly.
  3. If the port is found to be occupied during startup, the default port in the configuration file can be modified. Please refer to Management Port Matrix for all port purposes.