安装Grafana

  1. # 地址 https://grafana.com/grafana/download
  2. wget -O /opt/tgzs/grafana-7.5.1-1.x86_64.rpm https://dl.grafana.com/oss/release/grafana-7.5.1-1.x86_64.rpm
  3. sudo yum install grafana-7.5.1-1.x86_64.rpm

mysql中创建Grafana库

  1. CREATE DATABASE IF NOT EXISTS grafana DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

修改Grafana配置

  1. [root@prome-master01 ~]# vim /etc/grafana/grafana.ini
  2. type = mysql
  3. host = 127.0.0.1:3306
  4. name = grafana
  5. user = root
  6. # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
  7. password = 123123

启动服务

  1. systemctl start grafana-server
  2. systemctl enable grafana-server
  3. systemctl status grafana-server
  4. 查看日志 有无报错
  5. tail -f /var/log/grafana/grafana.log
  6. 默认 用户密码 admin/admin
  7. http://grafana.prome.wisrt.com:3000/?orgId=1