下载和安装grafana,此处例子为使用homebrew方式安装:
brew update
第二部安装grafana最新版本
brew install grafana
当出现如下信息代表安装成功:
To have launchd start grafana now and restart at login:
brew services start grafana
Or, if you don't want/need a background service you can just run:
grafana-server --config=/usr/local/etc/grafana/grafana.ini --homepath /usr/local/share/grafana cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.data=/usr/local/var/lib/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins
启动grafana
brew services start grafana
停止grafana
brew services stop grafana
当出现如下所示信息,代表启动成功
Successfully started `grafana` (label: homebrew.mxcl.grafana)
启动验证:grafana默认端口是3000,可以在浏览器中打开
http://127.0.0.1:3000
会进入登录页面:输入用户名:admin 密码:admin即可进入,第一次登录会提示修改密码,可以直接跳过,没有影响。如下图所示代表成功登录和启动。