Installation guides

Installing Grafana on RHEL

Step-by-Step Guide

  1. Update the Package Index
    Open a terminal and update the package index to ensure you have the latest information about available packages:
   sudo yum update -y
  1. Add the Grafana Repository
    Create a repository file for Grafana:
   sudo nano /etc/yum.repos.d/grafana.repo

Add the following content to the file:

   [grafana]
   name=grafana
   baseurl=https://packages.grafana.com/oss/rpm
   repo_gpgcheck=1
   enabled=1
   gpgcheck=1
   gpgkey=https://packages.grafana.com/gpg.key
   sslverify=1
   sslcacert=/etc/pki/tls/certs/ca-bundle.crt
  1. Install Grafana
    Install Grafana using the yum package manager:
   sudo yum install grafana -y
  1. Start and Enable Grafana
    Start the Grafana service:
   sudo systemctl start grafana-server

Enable Grafana to start on boot:

   sudo systemctl enable grafana-server
  1. Verify Grafana Installation
    Check the Grafana service status to ensure it is running:
   sudo systemctl status grafana-server

If Grafana is running, you should see an active (running) status.

  1. Access the Grafana Web Interface
    Open your web browser and navigate to http://your_server_ip:3000. You should see the Grafana login screen.
  2. Log In to Grafana
    The default username and password for Grafana are both admin. Log in using these credentials. You will be prompted to change the default password after the first login.
  3. Add a Data Source
    After logging in, you need to add a data source. Click on the gear icon (Configuration) on the left sidebar, then select “Data Sources” and click “Add data source”. Select your preferred data source type (e.g., Prometheus, MySQL, PostgreSQL) and configure the connection settings.
  4. Create a Dashboard
    To create a new dashboard, click on the plus icon (+) on the left sidebar, then select “Dashboard” and click “Add new panel”. You can add various panels (graphs, tables, etc.) and configure them to display data from your data source.
  5. Install Grafana Plugins (Optional)
    Grafana supports various plugins. To install a plugin, use the Grafana CLI. For example, to install the grafana-piechart-panel plugin: sudo grafana-cli plugins install grafana-piechart-panel Restart Grafana to apply the changes: sudo systemctl restart grafana-server
  6. Configure Grafana (Optional)
    You can configure Grafana settings by editing the Grafana configuration file located at /etc/grafana/grafana.ini. After making changes, restart Grafana to apply them: sudo nano /etc/grafana/grafana.ini sudo systemctl restart grafana-server
  7. Secure Grafana (Optional)
    For additional security, consider enabling HTTPS for Grafana. Obtain an SSL certificate (e.g., using Let’s Encrypt) and configure Grafana to use it by editing the configuration file:
    ini

[server]
protocol = https
cert_file = /path/to/your/cert.crt
cert_key = /path/to/your/cert.key

Other Recent Posts