SQL >> Database teknologi >  >> RDS >> Database

Installer InfluxDB på Ubuntu 20.10

InfluxDB er en open-source tidsseriedatabase designet til høje skrive- og forespørgselsbelastninger. Denne guide forklarer, hvordan du installerer, konfigurerer og får adgang til InfluxDB på Ubuntu 20.10.

Trin 1: Tilføj InfluxDB-repository

wget -q -O /tmp/influxdb.key https://repos.influxdata.com/influxdb.key
sudo apt-key add /tmp/influxdb.key
sudo sh -c 'echo "deb https://repos.influxdata.com/ubuntu bionic stable" > /etc/apt/sources.list.d/influxdb.list'

Trin 2: Opdatér pakker

sudo apt update

Trin 3: Installer InfluxDB

sudo apt install influxdb

Trin 4: Start og aktivér tjenesten

sudo systemctl start influxdb
sudo systemctl enable --now influxdb

Trin 5: Kontrollér service status

sudo systemctl status influxdb

Trin 6: Konfigurér InfluxDB

Redigér konfigurationsfilen:

/etc/influxdb/influxdb.conf

Aktivér HTTP-interface ved at fjerne kommentarer fra de relevante indstillinger. Genstart tjenesten efter ændringer:

sudo systemctl stop influxdb
sudo systemctl start influxdb

Trin 7: Opret administratorbruger

curl -XPOST "https://localhost:8086/query" --data-urlencode "q=CREATE USER influxdbadmin WITH PASSWORD 'StrongPassword' WITH ALL PRIVILEGES"

Trin 8: Få adgang til InfluxDB

influx -username 'influxdbadmin' -password 'StrongPassword'
CREATE DATABASE sysadminxpert_DB

Kør queries med HTTP

curl -G https://localhost:8086/query -u influxdbadmin:StrongPassword --data-urlencode "q=SHOW DATABASES"

Tillad firewall-adgang

sudo ufw allow 8086/tcp

InfluxDB er nu installeret og klar til tidsseriedata og forespørgsler.

  1. Installer MongoDB C++ driver på Ubuntu

  2. Installer den seneste MongoDB shell på Ubuntu 16.04

  3. Installér psycopg2 på Ubuntu

  4. Rettelse af "Cannot Install psycopg2" på Ubuntu