This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tango-docs/grafana-auto-deploy/install.sh
2019-09-12 14:01:15 +08:00

57 lines
1.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

################################################################################
# @File : install.sh
#
# @Date : 2019/09/12 11:42:17
# @Author : lwp
#
# @Brief :
#
#--------------------------- Revision History ----------------------------------
# No Version Date Revised By Item Description
# @1
#
################################################################################
#!bin/bash
# 安装
yum localinstall -y grafana-6.3.0-1.x86_64.rpm
# 配置
rm -rf /var/lib/grafana/grafana.db
# 展示 tfe 数据的 dashboard
cp dashboard-tfe.json /var/lib/grafana/
chown root:grafana /var/lib/grafana/dashboard-tfe.json
# dashboard 的配置文件
cp dashboard-tfe.yaml /etc/grafana/provisioning/dashboards/
chown root:grafana /etc/grafana/provisioning/dashboards/dashboard-tfe.yaml
# 需要根据实际情况修改 datasources-influxdb.yaml 文件中的下列配置项
# url : influxdb 访问地址
# user : influxdb 用户
# password: influxdb 用户密码
# database: influxdb 数据库名
cp datasources-influxdb.yaml /etc/grafana/provisioning/datasources/
chown root:grafana /etc/grafana/provisioning/datasources/datasources-influxdb.yaml
# 开机自启
systemctl enable grafana-server.service
# 启动
systemctl start grafana-server
# 卸载
# systemctl stop grafana-server
# rpm -e grafana-6.3.0-1
# rm -rf /var/lib/grafana
# rm -rf /var/log/grafana
# rm -rf /etc/grafana
# 管理地址
#http://host:3000/
#账户名admin
#密码admin