Call us Today +49 7543 609337-0
Log In

Welcome to this small HowTo on installing Grafana on CentOs 7. This tutorial will guide you throught the different steps of installing Grafana on CentOs 7.

HowTo Install Grafana on CentOs 7

First of all, we will need a basic CentOs 7 installation. There are no special requirements on what to select.   Next, we will need to add the Grafana yum repository to this freshly installed CentOs 7.  Use the following commands to add it to your system:

cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/6/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF

Now we can start the installation with the following command:

sudo yum install grafana

Please answere “y” to all questions.

Now let’s start the grafana service for the first time and also make it autostart when the system starts:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl start grafana-server.service 
sudo /bin/systemctl enable grafana-server.service

On a standard CentOs 7 installation, the firewall needs to be opened for the grafana user interface port ( TCP/3000 ), so let’s do it now:

firewall-cmd --permanent --zone=public --add-port=3000/tcp
firewall-cmd --reload

You should now be able to go to the web interface of your grafana installation using the following url:

http://<serverip>:3000/