Grafana is an open-source analytics and monitoring platform that is widely used for visualizing metrics data. Installing Grafana is a straightforward process, but it can vary depending on the operating system you are using. In this guide, we will provide you with step-by-step instructions for installing Grafana on different operating systems.
grafana-server.exe
http://localhost:3000
admin
curl -O https://dl.grafana.com/enterprise/release/grafana-enterprise-10.4.2.darwin-amd64.tar.gz tar -zxvf grafana-enterprise-10.4.2.darwin-amd64.tar.gz
brew services start grafana
.deb
.rpm
sudo apt-get install -y adduser libfontconfig1 musl wget https://dl.grafana.com/enterprise/release/grafana-enterprise_10.4.2_amd64.deb sudo dpkg -i grafana-enterprise_10.4.2_amd64.deb
wget https://dl.grafana.com/enterprise/release/grafana-enterprise-10.4.2.linux-amd64.tar.gz tar -zxvf grafana-enterprise-10.4.2.linux-amd64.tar.gz
sudo yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.4.2-1.x86_64.rpm
wget https://dl.grafana.com/enterprise/release/grafana-enterprise-10.4.2-1.x86_64.rpm sudo rpm -Uvh grafana-enterprise-10.4.2-1.x86_64.rpm
sudo service grafana-server start
Access Grafana: Open your web browser and navigate to http://localhost:3000 to access the Grafana web interface. The default username and password are both admin.
Grafana can also be easily installed and run using Docker, a popular containerization platform. Docker allows you to run applications in isolated environments called containers, which makes installing and managing Grafana simple and efficient. In this guide, we will provide you with a step-by-step guide to installing Grafana using Docker.
Prerequisites
Before you begin, ensure that you have Docker installed on your system. You can download and install Docker from the official Docker website (https://www.docker.com/get-started).
docker pull grafana/grafana
Run Grafana as a Docker Container Once the image is downloaded, you can run Grafana as a Docker container using the following command:
Docker(Alpine base image) Lightweight Docker container image using an Alpine base image.
docker run -d --name=grafana -p 3000:3000 grafana/grafana-enterprise
Docker(Ubuntu base image) Alternative Docker container image for those who prefer an Ubuntu base image.
docker run -d --name=grafana -p 3000:3000 grafana/grafana-enterprise:10.4.2-ubuntu
Access the Grafana Web Interface Open your web browser and navigate to http://localhost:3000 to access the Grafana web interface. You will be prompted to log in with the default username and password, which are both admin.
Configure Grafana (Optional) Once you have accessed the Grafana web interface, you can configure Grafana further by logging in with the default credentials. From there, you can change the default password, configure data sources, and set up dashboards.
Stop and Remove the Grafana Container (Optional) If you ever need to stop and remove the Grafana container, you can use the following commands:
docker stop grafana docker rm grafana
Installing Grafana on different operating systems is a relatively simple process that can be completed in just a few steps. By following the instructions provided in this guide, you can quickly set up Grafana and start visualizing your metrics data.
Reference