Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)

    You can install Grafana using Yum directly.

    Example:

    Or install manually using rpm. First execute

      Example:

      1. $ wget https://dl.grafana.com/oss/release/grafana-5.4.2-1.x86_64.rpm

      On OpenSuse:

      1. $ sudo rpm -i --nodeps <local rpm package>

      Install via YUM Repository

      Add the following to a new file at /etc/yum.repos.d/grafana.repo

      1. [grafana]
      2. name=grafana
      3. baseurl=https://packages.grafana.com/oss/rpm
      4. repo_gpgcheck=1
      5. enabled=1
      6. gpgcheck=1
      7. gpgkey=https://packages.grafana.com/gpg.key
      8. sslverify=1
      9. sslcacert=/etc/pki/tls/certs/ca-bundle.crt

      There is a separate repository if you want beta releases.

      1. [grafana]
      2. name=grafana
      3. baseurl=https://packages.grafana.com/oss/rpm-beta
      4. repo_gpgcheck=1
      5. gpgcheck=1
      6. gpgkey=https://packages.grafana.com/gpg.key
      7. sslcacert=/etc/pki/tls/certs/ca-bundle.crt

      The RPMs are signed, you can verify the signature with this public GPG key.

      Package details

      • Installs binary to /usr/sbin/grafana-server
      • Copies init.d script to /etc/init.d/grafana-server
      • Installs default file (environment vars) to /etc/sysconfig/grafana-server
      • Copies configuration file to /etc/grafana/grafana.ini
      • Installs systemd service (if systemd is available) name grafana-server.service
      • The default configuration uses a log file at /var/log/grafana/grafana.log
      • The default configuration specifies an sqlite3 database at /var/lib/grafana/grafana.db

      You can start Grafana by running:

      1. $ sudo service grafana-server start

      This will start the grafana-server process as the grafana user, which is created during package installation. The default HTTP port is 3000, and default user and group is admin.

      Default login and password admin/

      To configure the Grafana server to start at boot time:

      1. $ sudo /sbin/chkconfig --add grafana-server

      Start the server (via systemd)

      1. $ systemctl daemon-reload
      2. $ systemctl start grafana-server
      3. $ systemctl status grafana-server

      Enable the systemd service to start at boot

      Environment file

      The systemd service file and init.d script both use the file located at /etc/sysconfig/grafana-server for environment variables used when starting the back-end. Here you can override log directory, data directory and other variables.

      Database

      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.

      Server side image rendering

      Server side image (png) rendering is a feature that is optional but very useful when sharing visualizations, for example in alert notifications.

      If the image is missing text make sure you have font packages installed.

      1. yum install fontconfig
      2. yum install urw-fonts

      Installing from binary tar file

      Download the latest .tar.gz file 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.

      Logging in for the first time

      To run Grafana open your browser and go to http://localhost:3000/. 3000 is the default http port that Grafana listens to if you haven’t . Then follow the instructions here.