Install InfluxDB on RHEL / Centos 7

In this tutorial, How to install InfluxDB on RHEL / Centos 7. InfluxDB is an open-source time-series database. It is High availability storage and optimized for fast and metrics analysis.

To install InfluxDB on RHEL/CentOS 7, you can follow the steps below:

Install InfluxDB on RHEL / Centos 7

First, You add InfluxDB repository to your system using the command below

[vagrant@DevopsRoles ~]$ sudo vi  /etc/yum.repos.d/influxdb.repo

Add the content below:

name = InfluxDB Repository
baseurl =
enabled = 1
gpgcheck = 1
gpgkey =

Install InfluxDB

[vagrant@DevopsRoles ~]$ sudo yum -y install influxdb

Enable the InfluxDB service to start on system boot:

[vagrant@DevopsRoles ~]$ sudo systemctl enable influxdb

Start InfluxDB services on RHEL / Centos 7

[vagrant@DevopsRoles ~]$ sudo systemctl start influxdb

To check the status of InfluxDB is running

[vagrant@DevopsRoles ~]$ sudo systemctl status influxdb

Configure InfluxDB Firewall on RHEL / Centos 7

The default, InfluxDB uses TCP port 8086 for client-server communication over HTTP API, and TCP port 8088 is used for backup and restore.

Open the port on the Firewall using the command below

[vagrant@DevopsRoles ~]$ sudo firewall-cmd --add-port=8086/tcp --permanent
[vagrant@DevopsRoles ~]$ sudo firewall-cmd --reload

Configure InfluxDB HTTP Authentication on RHEL / Centos 7

Enable HTTP authentication

[vagrant@DevopsRoles ~]$ sudo vi /etc/influxdb/influxdb.conf

Add the content below:

 auth-enabled = true

Restart the InfluxDB service.

[vagrant@DevopsRoles ~]$ sudo systemctl restart influxdb

Create a user with an Authentication password

[vagrant@DevopsRoles ~]$ curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE USER \

You need to run any Influxdb commands on the terminal with a specific username and password.

[vagrant@DevopsRoles ~]$ influx -username 'username' -password 'password'

For example, the curl command uses the -u option to specify a username and password.

[vagrant@DevopsRoles ~]$ curl -G http://localhost:8086/query -u username:password --data-urlencode "q=SHOW DATABASES"

Check Influxdb service is listening

[vagrant@DevopsRoles ~]$ sudo netstat -nplt | grep 8086
Install InfluxDB on RHEL / Centos 7

You have successfully installed InfluxDB on RHEL/CentOS 7. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

6 thoughts on “Install InfluxDB on RHEL / Centos 7

  1. Thank your post. I have question. How to Multiple DB Influxdb for Telegraf for Monitoring?

  2. Hi
    I tried installing influxdb following the steps. while doing the curl command step, get error as below. Can you please suggest.

    # curl -XPOST “http://localhost:8086/query” –data-urlencode “q=CREATE USER \
    > influxadmin WITH PASSWORD ‘admin@123’ WITH ALL PRIVILEGES”

    html,body{height:100%;padding:0;margin:0;}.oc{display:table;width:100%;height:100%;}.ic{display:table-cell;vertical-align:middle;height:100%;}div.msg{display:block;border:1px solid #30c;padding:0;width:500px;font-family:helvetica,sans-serif;margin:10px auto;}h1{font-weight:bold;color:#fff;font-size:14px;margin:0;padding:2px;text-align:center;background: #30c;}p{font-size:12px;margin:15px auto;width:75%;font-family:helvetica,sans-serif;text-align:left;}504 DNS look up failed504 DNS look up failedThe webserver reported that an error occurred while trying to access the website. Please click here to return to the previous page.

    URL: http:// localhost:8086/query
    User name:
    Group name:

    [root@balavm1 ~]#

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.