安装过程不再赘述，参考官方说明https://grafana.com/docs/grafana/latest/installation/debian/#install-from-binary-targz-file我的安装目录是/data/app/grafana-7.4.5创建servicevim /lib/systemd/system/grafana-server.service编辑内容[Unit] Description=Grafana After=network.target [Service] ExecStart=/data/app/grafana-7.4.5/bin/grafana-server -homepath=/data/app/grafana-7.4.5 [Install] WantedBy=multi-user.target重载配置systemctl daemon-reload验证是否可以通过service启动成功systemctl start grafana-server systemctl status grafana-server设置开机自启systemctl enable grafana-server