Install InfluxDB on Fedora 30/Fedora 29

|
Last Updated:
|
|

Welcome to our guide on how to Install InfluxDB on Fedora 30/Fedora 29. InfluxDB is an open source time series database written in Go to provide scalable datastore for system metrics, events and real-time analytics. InfluxDB is designed to be fast, highly available and to handle high write and query loads. It is one of the major components of TICK stack which composes of Telegraf, InfluxDB, Chronograf and Kapacitor.

Install InfluxDB on Fedora 30/Fedora 29

To install InfluxDB on Fedora, you can manually use the RPM package or you can create the InfluxDB repo and install it automatically from repos.

We covered how to install Telegraf on Fedora 30/Fedora 29 in our previous guide. See the link below.

Install Telegraf on Fedora 30/Fedora 29

Install InfluxDB using RPM package

To install InfluxDB using RPM package, download the binary file from the downloads page.

wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.6.x86_64.rpm

Check the SHA256 hash of the downloaded binary if matches the hash provided on the downloads page, ffcf0def4a0bffb74728c7aaa0ade39231ea4e91b3be67de5528d7982b295ea8.

sha256sum influxdb-1.7.6.x86_64.rpm
ffcf0def4a0bffb74728c7aaa0ade39231ea4e91b3be67de5528d7982b295ea8 influxdb-1.7.6.x86_64.rpm

If all is well, proceed to install InfluxDB;

dnf localinstall influxdb-1.7.6.x86_64.rpm

Install InfluxDB from InfluxDB Repository

To install InfluxDB from InfluxDB repos, you need to create the InfluxDB repository on Fedora 30 as shown below;

cat > /etc/yum.repos.d/influxdb.repo << EOF
[influxdb]
name = InfluxDB Repository
baseurl = https://repos.influxdata.com/rhel/7Server/x86_64/stable/
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF

Next, install InfluxDB by running the command below;

dnf update
dnf install influxdb

Start and Enable InfluxDB service

Once the installation is done, you can start and enable InfluxDB service by running the commands;

systemctl start influxdb
systemctl enable influxdb

Open InfluxDB ports on Firewall

InfluxDB uses TCP ports 8086 and 8088 for client-server communication and for back up and restore operations respectively. Hence ensure that these ports are opened on firewalld.

firewall-cmd --add-port={8086,8088}/tcp --permanent
firewall-cmd --reload

Testing InfluxDB

Now that the installation of InfluxDB is done, you can, in basics, test it by creating a database as shown below;

curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE DATABASE testdb"
{"results":[{"statement_id":0}]}

Well that seems okay. You can also verify this by logging into InfluxDB and showing the databases as shown below. InfluxDB supports InfluxQL, an SQL-like query language that enables you to execute SQL like queries on InfluxDB

influx
Connected to http://localhost:8086 version 1.7.6
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
> show databases;
name: databases
name
----
telegraf
_internal
testdb

You can also create databases while you are logged in to InfluxDB just as you would on the other database systems;

create database testdb1 
> show databases;
name: databases
name
----
telegraf
_internal
testdb
testdb1
>

You can also create database user.

> use testdb
Using database testdb
> create user testuser with password 'StrongPass'
>

To show users in a database;

> show users
user     admin
----     -----
testuser false

To create and grant a user all privileges;

> create user amos with password 'NicePASS' with all privileges
> show users
user     admin
----     -----
testuser false
amos     true

Great. That is just about it on how to install InfluxDB on Fedora 30. Enjoy.

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment