How to install grafana on centos7? I know the step by step but it's not working

PROBLEMA INSTALAÇÃO DO GRAFANA NO CENTOS7

Comandos

Desabilitando o SELinux
vim /etc/sysconfig/selinux

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

Baixando com esse comando da o seguinte erro:

sudo yum localinstall grafana-6.2.4-1.x86_64.rpm

Error: File contains no section headers.
file: file:///etc/yum.repos.d/grafana.repo, line: 1
‘name=grafana\n’

Quando tento iniciar também aparece
systemctl start grafana-server
Error: Failed to start grafana-server.service: Unit not found.

Eu já tinha instalado , estava rodando no terminal só que parou de funcionar, estou usando o centos7.

PROBLEM INSTALLING GRAFANA ON CENTOS7

commands

Disabling SELinux
vim /etc/sysconfig/selinux

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

Downloading with this command gives the following error:

sudo yum localinstall grafana-6.2.4-1.x86_64.rpm

Error: The file does not contain section headers.
file: file:///etc/yum.repos.d/grafana.repo, line: 1
‘name=grafana\n’

When I try to start it also appears
systemctl start grafana-server
Error: Failed to start grafana-server.service: Drive not found.

I already had it installed, it was running in the terminal but it stopped working, I’m using centos7.

Hi @vitoriadelaraestudo, welcome to the :grafana: community.

It seems to be a problem that you want to install an older version of grafana ver.6.2.4 but you also have a repo file which might be getting conflict when using yum to install it.

The easiest way is to rename the repo file //etc/yum.repos.d/grafana.repo to something like //etc/yum.repos.d/grafana.repo.bak

and then do the following;

login as full root;

su -

then run this command

yum localinstall grafana-6.2.4-1.x86_64.rpm

Then it should be all fine.