Build from tag v3.1.1 with
this
phantomjs
binary working on raspberry pi 2 (and 3) running raspbian/wheezy or jessie.
go
version was 1.5.2, nodejs
was 5.10.1, npm
was 3.8.3 and phantomjs
was 2.1.1. The build was done
on a jessie based arm docker container, specifically
resin/armv7hf-debian:jessie.
- Have a look on what I wrote on
go
andnodejs
for building v2.6.0. This still holds. - Have a look on what I wrote on
node-sass
for buiding v3 beta. This is the reason for the choice of a jessie based distro in this build. Alternately, I could probably have follow what I did to build grafana v3.1.1 on wheezy to get the needed c++11 compliant g++. - Since the PhantomJS binary used is now a proper v2.1.1, previous trick to patch the binary has no reason to be anymore.
- Finally, you can read the reason for the manual install of PhantomJS.
sudo apt-get update
sudo apt-get install curl git ca-certificates
sudo apt-get install binutils gcc make libc-dev
sudo apt-get install ruby ruby-dev # for fpm
sudo apt-get install rpm # for rpmbuild, used indirectly by grafana (call to fpm)
sudo apt-get install libfontconfig1 # for phantomjs v2.1.1
sudo apt-get install python g++ # for node-sass
Install go 1.5.2 from hypriot :
curl -L https://github.com/hypriot/golang-armbuilds/releases/download/v1.5.2/go1.5.2.linux-armv7.tar.gz | sudo tar -xz -C /usr/local
export PATH=/usr/local/go/bin:$PATH
Install nodejs :
curl -L https://nodejs.org/dist/v5.10.1/node-v5.10.1-linux-armv7l.tar.xz | sudo tar -xJ --strip-components=1 -C /usr/local
Install fpm :
gem install fpm
Finally, install your phantomjs
binary. For example :
curl -L https://github.com/fg2it/phantomjs-on-raspberry/releases/download/v2.1.1-wheezy-jessie/phantomjs_2.1.1_armhf.deb -o /tmp/phantomjs_2.1.1_armhf.deb
sudo dpkg -i /tmp/phantomjs_2.1.1_armhf.deb
The good news is that now you just have to follow the official instructions with just a few modifications.
export GOPATH=/tmp/graf-build
mkdir -p $GOPATH
cd $GOPATH
go get github.com/grafana/grafana
cd $GOPATH/src/github.com/grafana/grafana
git checkout v3.1.1
go run build.go setup
$GOPATH/bin/godep restore
npm install
Finally,
go run build.go build package
The packages are in ./dist
You simply have to install the dependencies, download the .deb package and install it.
sudo apt-get install adduser libfontconfig
curl -L https://github.com/fg2it/grafana-on-raspberry/releases/download/v3.1.1-wheezy-jessie/grafana_3.1.1-1472506485_armhf.deb -o /tmp/grafana_3.1.1-1472506485_armhf.deb
sudo dpkg -i /tmp/grafana_3.1.1-1472506485_armhf.deb
For additional help, see the v3.1 official documentation.