Install & Deployment

openGeminiAbout 4 minAbout 1343 words

This section introduces how to quickly get started with the openGemini.

Installation

PlatformSupport or notNote
X86-64-
X86-3232-bit is not currently supported, but since the openGemini kernel is developed by Golang.
you can try to compile it on a 32-bit system.
ARM-64-
ARM-3232-bit is not currently supported, but since the openGemini kernel is developed by Golang.
you can try to compile it on a 32-bit system.
othersnot support

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

Tips

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

> ./ts-cli --host 192.168.0.1 --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

Effects

> 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

Effects

> 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

Attention

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/install.sh 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.