Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB.
- Go 1.6
- NodeJS v4+
- sqlite3
vi /etc/profile
export GOPATH="/root/go"
export GOROOT="/usr/local/go"
export PATH=$GOROOT/bin:$PATH
export PATH=$GOPATH/bin:$PATH
从https://nodejs.org/en/下载node源码包
cd /usr/local
tar -zxvf node-v4.5.0-linux-x64.tar
chmod -R 755 node
vi /etc/profile
export NODE=/usr/local/node
export PATH=${NODE}/bin:$PATH
创建$GOPATH/src/github.com/grafana/grafana目录,然后git最新的代码到此目录.
mkdir $GOPATH/src/github.com/grafana/grafana
cd $GOPATH/src/github.com/grafana/grafana
go run build.go setup
go run build.go build
cd $GOPATH/src/github.com/grafana/grafana
npm install --registry=http://registry.npm.taobao.org
npm install -g grunt-cli --registry=http://registry.npm.taobao.org
grunt
./bin/grafana-server
- 打开浏览器 (默认 http://localhost:3000 匿名方式登录<部分功能存在权限限制>)
- 打开登陆页面 (默认 http://localhost:3000/login 用户名/密码 = admin/admin 功能没有权限限制).
在/etc/grafana/目录:
- grafana.ini
- dev.ini (if found)
- custom.ini
在/usr/share/grafana/conf
1.defaults.ini 2.sample.ini
发布安装包依赖FPM工具.
####安装GEM
sudo apt-get install ruby
sudo apt-get install ruby-dev
####安装FPM
gem install fpm
发布后的安装包(.tar .deb .rpm文件)都存在在$GOPATH/src/github.com/grafana/grafana/dist目录下面, 部分临时文件都存在在/tmp目录下面
go run build.go build package