(Last Updated On: November 21, 2018)

Welcome to our article on how to install InfluxDB on Fedora 29 / Fedora 28. InfluxDB is an open-source time series database written in Go. InfluxDB is optimized for fast, high-availability storage and retrieval of time series data for metrics analysis.

I had earlier written similar articles for CentOS 7 and Ubuntu/Debian Linux distributions:

Install InfluxDB on Ubuntu 18.04 and Debian 9

Install Grafana and InfluxDB on CentOS 7

Follow the steps given in this article to get a working InfluxDB installation on Fedora 29 / Fedora 28.

Step 1: Add Influxdata RPM repository

Influxdata provides the repository for installing InfluxDB on  CentOS 7 / Fedora 29 / Fedora 28. Add it to your system like below:

sudo vi /etc/yum.repos.d/influxdb.repo

Add:

[influxdb]
name = InfluxDB Repository - RHEL 
baseurl = https://repos.influxdata.com/rhel/7/x86_64/stable/
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key

Save the file and close it.

Step 2: Install InfluxDB on Fedora 29 / Fedora 28

Now that InfluxDB repository has been added to your system, you can proceed to install InfluxDB on Fedora 29 / Fedora 28.

sudo dnf install influxdb

When asked to import GPG key for the repository, press key

Importing GPG key 0x2582E0C5:
Userid : "InfluxDB Packaging Service <[email protected]>"
Fingerprint: 05CE 1508 5FC0 9D18 E99E FB22 684A 14CF 2582 E0C5
From : https://repos.influxdata.com/influxdb.key
Is this ok [y/N]: y

The version of InfluxDB installed can be confirmed using the rpmcommand:

$ rpm -qi influxdb
Name        : influxdb
Version     : 1.7.1
Release     : 1
Architecture: x86_64
Install Date: Wed 21 Nov 2018 07:10:14 PM UTC
Group       : default
Size        : 105622407
License     : Proprietary
Signature   : RSA/SHA256, Thu 15 Nov 2018 01:26:48 AM UTC, Key ID 684a14cf2582e0c5
Source RPM  : influxdb-1.7.1-1.src.rpm
Build Date  : Thu 15 Nov 2018 12:22:46 AM UTC
Build Host  : 561b607543bc
Relocations : / 
Packager    : [email protected]
Vendor      : InfluxData
URL         : https://influxdata.com
Summary     : Distributed time-series database.
Description :
Distributed time-series database.

Step 3: Start and enable InfluxDB service

InfluxDB service is not started by default after installation. You need to start it manually.

sudo systemctl start influxdb

Also enable the service to start on OS boot up.

sudo systemctl enable influxdb

If the start was successful, the check on status should indicate “running”

$ sudo systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
   Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-11-21 19:17:50 UTC; 1min 7s ago
     Docs: https://docs.influxdata.com/influxdb/
 Main PID: 11074 (influxd)
    Tasks: 8 (limit: 1149)
   Memory: 10.3M
   CGroup: /system.slice/influxdb.service
           └─11074 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.321738Z lvl=info msg="Starting precreation service" log_id=0Bu>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.321896Z lvl=info msg="Starting snapshot service" log_id=0Buw9k>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.322058Z lvl=info msg="Starting continuous query service" log_i>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.322305Z lvl=info msg="Starting HTTP service" log_id=0Buw9ktl00>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.322526Z lvl=info msg="opened HTTP access log" log_id=0Buw9ktl0>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.323043Z lvl=info msg="Listening on HTTP" log_id=0Buw9ktl000 se>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.323352Z lvl=info msg="Starting retention policy enforcement se>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.323662Z lvl=info msg="Listening for signals" log_id=0Buw9ktl000
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.324301Z lvl=info msg="Storing statistics" log_id=0Buw9ktl000 s>
Nov 21 19:17:51 fed29 influxd[11074]: ts=2018-11-21T19:17:51.324810Z lvl=info msg="Sending usage statistics to usage.influx

Step 4: Using InfluxDB – Basics

Some of the basics InfluxDB usage are:

1. Create a database

$ influx
Connected to http://localhost:8086 version 1.7.1
InfluxDB shell version: 1.7.1
Enter an InfluxQL query
> CREATE DATABASE monitoring

2. Use a Database

> SHOW DATABASES
name: databases
name
----
_internal
monitoring
> 
> USE monitoring

3. Show Database Measurements

> SHOW MEASUREMENTS

4. Select from a measurement

SELECT * FROM disk

You have successfully installed InfluxDB on Fedora 29 / Fedora 28. Also read How to Install Telegraf on Fedora 29 / Fedora 28