How to Install InfluxDB on Ubuntu 16.04 Linux Server

InfluxData delivers a completely open-source platform built specifically for metrics, events, and other time-based data — a modern time-series platform.

Whether the data comes from humans, sensors, or machines, InfluxData empowers developers to build next-generation monitoring, analytics, and IoT applications faster, easier, and to scale delivering real business value quickly.

In this tutorial, we are going to explain how you can install InfluxDB on Ubuntu Linux server 16.04 step by step.

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 ‘verysecret’ 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 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

4. After you set the authentication and restart InfluxDB, you will get the error message just like below.

5. To avoid this error type your username and password that we created, and you will be able to do quires again.

Summary

After this tutorial you should be able to install InfluxDB, and also be able to create admin user and enable the authentication on it.

Miguel

I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...