Installing RRDtool with perl bindings on the NSLU

RRDtool is a nifty database mechanism that is widely used for monitoring parameters of routers, switches, weather stations, solar installations, …

I use it to monitor various parameters of our home. Since this is a 24/7 task, I run it on a low-power devic: the NSLU2. This article describes how to install the RRDtools on the NSLU2 (running Unslung).

On the unslung NSLU with native toolchain installed, get the tarball of a recent version of RRDtool.

First install some supporting packages:

 ipkg install libpng
ipkg install libart
ipkg install freetype
ipkg installĀ  ttf-bitstream-vera

Then extract the source package and configure it with:

./configure --prefix=/opt --disable-rrdcgi --disable-nls --disable-python

Then continue with the normal make && make install.

Finally, cd to bindings/perl-shared and execute the steps defined in the README. First create the Makefile (perl Makefile.PL) and then adapt the generated Makefile to fix the following lines:

CC = /opt/bin/gcc
LD = /opt/bin/ld

If you then want to use my scripts to collect data from sensors around the house, you’ll also need to install the perl module ‘XML::Simple’. The way to go is to download the package from CPAN and to install it in the usual way (perl, make, make test, make install).

This has been tested on Unslung 6.8.