[SOLVED] Grafana 7 - installation from source? FreeBSD support?

Hi all,

while there is a ready to use package of Grafana 6 for FreeBSD the installation instructions for version 7 omit installation from source entirely.

Any hints? I would try to work on a FreeBSD package myself, I have some experience building FreeBSD “ports” as they are called, but I would need some documentation on how to go about it. Not all the world’s Unices are Linux …

Kind regards,
Patrick

1 Like

No luck getting the port updated to 7.0.3 but I installed it manually.

I installed node12, yarn-node12 and gmake. Got the source and ran gmake.

Made a backup of my DB and the rc-script and removed the grafana6 package.
Next created the necessary directories: /var/log/grafana, /var/db/grafana, /usr/local/share/granafa/(conf and data/log). Set owners to grafana:grafana
Copied from src conf/default.ini to the conf directory and public to /usr/local/share/grafana/public and copied the grafana rc-script back.
Grafana started up without any issues. Afterwards I updated the plugins.

I did get an error on one of the node-packages (Cypress, FreeBSD not supported…) but as far as I could tell it was not really necessary.

2 Likes

Thanks a lot for that update. I thought Grafana was written in Golang? Did this change with 7.0?

It is. But the old port doesn’t build when just changing the version and I’m no golang export the figure out what the reason is (still old school make guy…). So I ran make or rather gmake as that one was needed and it required yarn (specifically node12 yarn, what’s the deal with all these compatibility breaking???).
From what I can tell only the build-system requires yarn/node. Once built it just works.

1 Like

Just materialized in zhe FreeBSD ports tree and runs beautifully:
https://www.freshports.org/www/grafana7/

Thanks folks for this great piece of software and thanks to the port maintainer for the porting effort!

No I have to find out how to use transformations to average my CPU temperature over all cores :wink: