How to install InfluxDB in CentOS 7

by Daniel Pham
Published: Updated:

How to install InfluxDB in CentOS 7? In this article, I will guide you step by step to install InfluxDB time series database in CentOS 7.

You can install it for testing before using it.

Preparation steps before installation

Server information

  1. OS: CentOS Linux release 7.6.1810 (Core).
  2. RAM: For testing, you can choose 1GB of RAM, while on production environment it depends on the size of your system. I recommend that the minimum is 4GB of RAM.
  3. CPU: to test, you can choose 1 CPU, on the production environment I recommend a minimum of 4 CPUs.
  4. HDD: For testing, you can leave 20 GB, on production environment, I recommend a minimum of 100GB. I have run a server InfluxDB 100 GB HDD and can use it for more than 8 months.

Prepare NTP

You see, because this is a time series database. Therefore, we need accurate timestamps between servers.

I recommend that you install a NTP local server and synchronize all servers in the system to it, including InfluxDB server.

I have been faced with a case of displaying InfluxDB data to Grafana wrong. Same dashboard but different web servers display. Finally, I found the reason why NTP is not the same for each server, resulting in timestamp not the same.

Install InfluxDB in CentOS 7

install influxdb time series database in centos 7
Install InfluxDB time series database in CentOS 7

InfluxDB’s documentation page has instructions for installing on different OS types, you can read more.

Here, I just instructed you to install it on CentOS 7.

First, you need root or sudo permissions to install the software.

Next, you create a repo file for InfluxDB. Thus, you can install and update InfluxDB via yum.

cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
name = InfluxDB Repository - RHEL $releasever
baseurl =$releasever/$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey =

Then you type the following command to install this database.

yum install influxdb -y

Enable influxdb service after reboot.

systemctl enable influxdb

Start InfluxDB service.

service influxdb start

You can check status of influxdb service.

[root@influxdb ~]# service influxdb status
Redirecting to /bin/systemctl status influxdb.service
 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 Thu 2019-08-01 10:01:32 +07; 6s ago
 Main PID: 23939 (influxd)
   CGroup: /system.slice/influxdb.service
           └─23939 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855117Z lvl=info msg="Starting precreation service" log_id=0Gzmr9dW000 service=shard-precreation check_interval=10m advance_period=30m
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855125Z lvl=info msg="Starting snapshot service" log_id=0Gzmr9dW000 service=snapshot
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855132Z lvl=info msg="Starting continuous query service" log_id=0Gzmr9dW000 service=continuous_querier
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855141Z lvl=info msg="Starting HTTP service" log_id=0Gzmr9dW000 service=httpd authentication=false
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855146Z lvl=info msg="opened HTTP access log" log_id=0Gzmr9dW000 service=httpd path=stderr
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855266Z lvl=info msg="Listening on HTTP" log_id=0Gzmr9dW000 service=httpd addr=[::]:8086 https=false
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.855283Z lvl=info msg="Starting retention policy enforcement service" log_id=0Gzmr9dW000 service=retention check_interval=30m
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.858979Z lvl=info msg="Listening for signals" log_id=0Gzmr9dW000
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.859398Z lvl=info msg="Storing statistics" log_id=0Gzmr9dW000 service=monitor db_instance=_internal db_rp=monitor interval=10s
Aug 01 10:01:33 influxdb.local influxd[23939]: ts=2019-08-01T03:01:33.859541Z lvl=info msg="Sending usage statistics to" log_id=0Gzmr9dW000

Open firewall port for InfluxDB

InfluxDB uses 2 ports 8086 and 8088. We will open these 2 ports on firewalld with the following command.

[root@influxdb ~]# firewall-cmd --permanent --add-port=8086/tcp
[root@influxdb ~]# firewall-cmd --permanent --add-port=8088/tcp
[root@influxdb ~]# firewall-cmd --reload


So you can successfully install InfluxDB. This is just the first step, you have a lot of things to do before you can use it.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Notify of
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.



Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 – All rights reserved.

Please write sources “” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Would love your thoughts, please comment.x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.