Install Grafana and InfluxDB on Ubuntu Server 17.04
This quickstart assumes you know how to install Ubuntu and access it through a terminal (command line).
EDIT: There seems to be a bug with the latest stable version of Grafana (2.6) and running on a headless system such as the one I’m describing here (Ubuntu Server). This bug causes icons not to be displayed in the web interface. I would suggest either using Ubuntu Desktop (I have not tested this myself) or using Grafana 3 which does not have this bug (I tested this and it does work on Ubuntu Server 16.04. I’ve updated the Grafana installation instructions to include version 3 as well).
After a clean installation, setup openssh server or complete the following from console;
sudo apt update
and
sudo apt upgrade
Install InfluxDB
The instructions below are based on the official documentation which can be found here: https://docs.influxdata.com/influxdb/v0.12/introduction/installation/
First, configure the package sources.
Make sure you’ve previously used sudo in the current session, so that the sudo in the command below does not prompt you for a password again. To make sure, you can just run “sudo ls” and check that it doesn’t prompt for a password.
If you copy and paste this, make sure it is three separate lines.
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - |
source /etc/lsb-release
echo “deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable” | sudo tee /etc/apt/sources.list.d/influxdb.list |
This will create a file called “/etc/apt/sources.list.d/influxdb.list” if it worked.
Then install InfluxDB:
sudo apt-get update && sudo apt-get install influxdb
Start InfluxDB. This command produces no output.
sudo service influxdb start
Install Grafana
The instructions below are based on the official documentation, available here: http://docs.grafana.org/installation/debian/
Configure package sources. You can either install the latest stable version (2.6 currently), or the Beta/Testing version (3.0 beta currently).
Due to a bug with 2.6 and Ubuntu 16.04 Server, I recommend using the beta version if you’re using Ubuntu Server in a headless configuration (No X).
For the current Stable version (2.6), use:
echo “deb https://packagecloud.io/grafana/stable/debian/ wheezy main” | sudo tee /etc/apt/sources.list.d/grafana.list |
curl https://packagecloud.io/gpg.key | sudo apt-key add - |
Update package repositories and install Grafana:
sudo apt-get update && sudo apt-get install grafana
Start the grafana server:
sudo service grafana-server start
Configure Grafana
These instructions are for Grafana 2.6, but if you installed the beta version it is very similar.
Then use a webbrowser to connect to grafana, using the hostname or IP of your Ubuntu server and port 3000. Log in with admin/admin:
http://statsdemo:3000/