Skip to main content

InfluxDB Installation Guide

This guide provides all the key information and getting-started instructions after a successful InfluxDB 2.x installation via DeploySage-CLI.

First-Time Setup

After installation, you must initialize your InfluxDB instance. This can be done through the web UI or the command-line interface.

Alternatively, you can use the CLI:

influx setup --username my-user --password my-password --org my-org --bucket my-bucket -f

Service Management

Manage the InfluxDB service using standard systemctl commands.

# Start the InfluxDB service
sudo systemctl start influxdb

# Stop the service
sudo systemctl stop influxdb

# Check the service status
sudo systemctl status influxdb

# View real-time logs
sudo journalctl -u influxdb -f

Writing and Querying Data

# Configure your connection profile
influx config create -n default \
-u http://localhost:8086 \
-t YOUR_API_TOKEN \
-o YOUR_ORGANIZATION

# Write data using Line Protocol
influx write -b YOUR_BUCKET 'myMeasurement,host=host1 value=25.5'

# Query data using the Flux language
influx query 'from(bucket:"YOUR_BUCKET") |> range(start: -1h)'