Data AnalyticsHow ToLinuxTutorials/DIY

How to Install InfluxDB on Ubuntu

What is InfluxDB?

InfluxDB

is an open-source time series database (TSDB) developed by InfluxData. It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics.

What is a Time Series Database?

A Time Series Database (TSDB) is a database optimized for time-stamped or time series data. Time series data are simply measurements or events that are tracked, monitored, downsampled, and aggregated over time. This could be server metrics, application performance monitoring, network data, sensor data, events, clicks, trades in a market, and many other types of analytics data.

For more information read this article https://iotbyhvm.ooo/what-is-a-time-series-database/

Why InfluxDB

You can even use InfluxDB outside IT related usage for example you want to store time series market price of a commodity. You can also use InfluxDB to store metrics for your Internet Of Things (IoT) projects.

Several key features of InfluxDB:

  • Simple to install with no dependencies.
  • Support for hundreds of thousands of writes per seconds.
  • Data tagging for flexible querying.
  • Native HTTP API, no need to manage server side code.
  • Time-centric functions and easy to use SQL-like query language.
  • Every data point indexed as it comes in and immediately available in less than 100ms
  • Specific purpose for time series data. no special schema design or custom app logic required to use InfluxDB.

By default, InfluxDB uses the following ports: * TCP port 8083 is used by InfluxDB Admin Panel * TCP port 8086 is used for client server communication over HTTP API.

If you use firewall make sure that you allow both port above as needed.

Install InfluxDB

1. First, update all your current system packages by the command

sudo apt-get update

2. Add “InfluxDB” key to verify the packages that will be installed by the below command.

sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add –

3. Add “InfluxDB” to the repository file by the below command.

sudo echo “deb https://repos.influxdata.com/ubuntu trusty stable” | sudo tee /etc/apt/sources.list.d/influxdb.list

4. Re-update your system packages with the command

sudo apt-get update

5. Now you are ready to run the below command to install InfluxDB.

sudo apt-get -y install influxdb

6. Now you had successfully installed InfluxDB, you can open it from the web page by entering your IP address following by “:8083”.

7. To create a super admin with all privileges by the command below on the query box.

CREATE USER “admin” WITH PASSWORD ‘password’ WITH ALL PRIVILEGES

8. Run the query “Show users” to make sure that your admin user is created successfully.

Enable authentication

By default, authentication isn’t enabled on InfluxDB to enable follow the given below steps.

1.Open the configuration file with the nano editor by the below command.

sudo nano /etc/influxdb/influxdb.conf

2. Search for “Auth-Enabled” and change it from “false” to “true” like the screenshot below.

3. Restart InfluxDB so changes take effect by the below command.

sudo service influxdb restart

 

 

Harshvardhan Mishra

Hi, I'm Harshvardhan Mishra. Tech enthusiast and IT professional with a B.Tech in IT, PG Diploma in IoT from CDAC, and 6 years of industry experience. Founder of HVM Smart Solutions, blending technology for real-world solutions. As a passionate technical author, I simplify complex concepts for diverse audiences. Let's connect and explore the tech world together! If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning! Linkedin

6 thoughts on “How to Install InfluxDB on Ubuntu

Leave a Reply

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