Wednesday, July 14, 2021

Installing Grafana

 

For Linux

  1. Add the Grafana APT repository (Debian/Ubuntu):


    sudo apt-get install -y software-properties-common sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
  2. Add the Grafana GPG key:


    wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
  3. Update your package list and install Grafana:


    sudo apt-get update sudo apt-get install grafana
  4. Start and enable the Grafana service:


    sudo systemctl start grafana-server sudo systemctl enable grafana-server
  5. Access Grafana: Open your web browser and go to http://localhost:3000. The default login is admin/admin.

For CentOS/RHEL

  1. Add the Grafana YUM repository:


    sudo tee /etc/yum.repos.d/grafana.repo <<EOF [grafana] name = Grafana baseurl = https://packages.grafana.com/oss/rpm repo_gpgcheck=1 gpgcheck=1 enabled=1 gpgkey=https://packages.grafana.com/gpg.key EOF
  2. Install Grafana:


    sudo yum install grafana
  3. Start and enable the Grafana service:


    sudo systemctl start grafana-server sudo systemctl enable grafana-server
  4. Access Grafana: Open your web browser and go to http://localhost:3000. The default login is admin/admin.

For Windows

  1. Download the Grafana installer: Go to the Grafana download page and download the Windows installer.

  2. Run the installer: Follow the prompts in the installer to complete the installation.

  3. Start Grafana: Grafana should start automatically. If not, you can start it from the Windows Start Menu.

  4. Access Grafana: Open your web browser and go to http://localhost:3000. The default login is admin/admin.

For Docker

  1. Pull the Grafana Docker image:


    docker pull grafana/grafana
  2. Run Grafana in a Docker container:


    docker run -d -p 3000:3000 grafana/grafana
  3. Access Grafana: Open your web browser and go to http://localhost:3000. The default login is admin/admin.

Post-Installation

After installing Grafana, you might want to:

  • Add data sources: Grafana supports various data sources like Prometheus, InfluxDB, MySQL, etc. You can configure them from the Grafana UI under Configuration > Data Sources.
  • Create dashboards: Start building your dashboards by going to Create > Dashboard.

Feel free to ask if you have any questions or run into any issues during the installation!