GreptimeDB Standalone
We use the simplest configuration for you to get started. For a comprehensive list of configurations available in GreptimeDB, see the configuration documentation.
Binary
Download from website
You can try out GreptimeDB by downloading the latest stable build releases from the Download page.
Linux and macOS
For Linux and macOS users, you can download the latest build of the greptime
binary by using the following commands:
curl -fsSL \
https://raw.githubusercontent.com/greptimeteam/greptimedb/main/scripts/install.sh | sh -s v0.10.0-nightly-20240722
Once the download is completed, the binary file greptime
will be stored in your current directory.
You can run GreptimeDB in the standalone mode:
./greptime standalone start
Windows
If you have WSL(Windows Subsystem for Linux) enabled, you can lunch a latest Ubuntu and run GreptimeDB like above!
Otherwise please download the GreptimeDB binary for Windows at our official site, and unzip the downloaded artifact.
To run GreptimeDB in standalone mode, open a terminal (like Powershell) at the directory where the GreptimeDB binary locates, and execute:
.\greptime standalone start
Docker
Make sure the Docker is already installed. If not, you can follow the official documents to install Docker.
docker run -p 127.0.0.1:4000-4003:4000-4003 \
-v "$(pwd)/greptimedb:/tmp/greptimedb" \
--name greptime --rm \
greptime/greptimedb:v0.10.0-nightly-20240722 standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003
To avoid accidently exit the Docker container, you may want to run it in the "detached" mode: add the -d
flag to
the docker run
command.
The data will be stored in the greptimedb/
directory in your current directory.
If you want to use another version of GreptimeDB's image, you can download it from our GreptimeDB Dockerhub. In particular, we support GreptimeDB based on CentOS, and you can try image greptime/greptimedb-centos
.
If you are using a Docker version lower than v23.0, you may experience problems with insufficient permissions when trying to run the command above, due to a bug in the older version of Docker Engine.
You can:
-
Set
--security-opt seccomp=unconfined
, for example:docker run --security-opt seccomp=unconfined -p 4000-4003:4000-4003 \
-v "$(pwd)/greptimedb:/tmp/greptimedb" \
--name greptime --rm \
greptime/greptimedb:v0.10.0-nightly-20240722 standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003 -
Upgrade the Docker version to v23.0.0 or higher;
Binding address
GreptimeDB binds to 127.0.0.1
by default. If you need to accept connections from other addresses, you can start with the following parameters.
If the computer running GreptimeDB is directly exposed to the internet, binding to 0.0.0.0
is dangerous and will expose the instance to everybody on the internet.
- Binary
- Docker
./greptime standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003
docker run -p 0.0.0.0:4000-4003:4000-4003 \
-v "$(pwd)/greptimedb:/tmp/greptimedb" \
--name greptime --rm \
greptime/greptimedb:v0.10.0-nightly-20240722 standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003
You can also refer to the Configuration document to modify the bind address in the configuration file.
Next Steps
Learn how to write data to GreptimeDB in the Quick Start.