Adding rrdtool module to php in ubuntu (8.04 – 9.04)

rrdtool is a powerful set of tool to log and graph data over time. I wanted to add it to the apache server in ubuntu 8.10, but there’s no package already built. Here is how I did it:

Taken from here:

http://www.samtseng.liho.tw/~samtz/blog/?p=1853

here are the commands that i’v used to compile and install on ubuntu 8.04.1 and 9.04 (both versions work fine)

apt-get install librrd2-dev php5-dev
wget http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tar.gz
tar zxvf php_rrdtool.tar.gz
mv rrdtool /usr/include/php5/ext
cd /usr/include/php5/ext/rrdtool
phpize
./configure –with-php-config=/usr/bin/php-config –with-rrdtool=/usr
ln -s /usr/lib/librrd.so.2 /usr/lib/librrd.so (if file exists ignore)
make
make install
cd /etc/php5/conf.d/
pico rrdtool.ini
paste the following
;enable rrdtool extension module
extension=rrdtool.so
save and exit pico
/etc/init.d/apache2 restart

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *