Installing on Debian / Ubuntu
Example:
sudo apt-get install -y adduser libfontconfig1
sudo dpkg -i grafana_5.4.2_amd64.deb
APT Repository
The command add-apt-repository
isn’t a default app on Debian 9 and requires
apt-get install -y software-properties-common
Install the repository for stable releases
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
There is a separate repository if you want beta releases.
Use the above line even if you are on Ubuntu or another Debian version. Then add our gpg key. This allows you to install signed packages.
sudo wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
Update your Apt repositories and install Grafana
sudo apt-get update
sudo apt-get install grafana
sudo apt-get install -y apt-transport-https
Package details
- Installs binary to
/usr/sbin/grafana-server
- Installs Init.d script to
/etc/init.d/grafana-server
- Creates default file (environment vars) to
- Installs configuration file to
/etc/grafana/grafana.ini
- The default configuration sets the log file at
/var/log/grafana/grafana.log
- The default configuration specifies an sqlite3 db at
/var/lib/grafana/grafana.db
- Installs HTML/JS/CSS and other Grafana files at
/usr/share/grafana
Start Grafana by running:
This will start the grafana-server
process as the grafana
user, which was created during the package installation. The default HTTP port is 3000
and default user and group is admin
.
Default login and password admin
/ admin
To configure the Grafana server to start at boot time:
sudo update-rc.d grafana-server defaults
Start the server (via systemd)
To start the service using systemd:
systemctl start grafana-server
systemctl status grafana-server
Enable the systemd service so that Grafana starts at boot.
sudo systemctl enable grafana-server.service
Environment file
By default Grafana will log to /var/log/grafana
The default configuration specifies a sqlite3 database located at /var/lib/grafana/grafana.db
. Please backup this database before upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on the configuration page.
The configuration file is located at /etc/grafana/grafana.ini
. Go the page for details on all those options.
Installing from binary tar file
Download and extract it. This will extract into a folder named after the version you downloaded. This folder contains all files required to run Grafana. There are no init scripts or install scripts in this package.
To configure Grafana add a configuration file named custom.ini
to the conf
folder and override any of the settings defined in conf/defaults.ini
.
Start Grafana by executing ./bin/grafana-server web
. The binary needs the working directory to be the root install directory (where the binary and the public
folder is located).