PHP-RRDTool installation on CentOS 5

Step-1 Adding Yum Repository

Add the Reporforge repository. Then-

Yum install php-rrdtool

Alternatively, you can download the rpm from

Step-2 : Configure in php configuration file.

# cd /etc/php.d/
# vi rrdtool.ini
; Enable rrdtool extension module

Next Restart apache web services.

# service httpd restart

Step-3 Checking php-rrd module is working fine

You need to have PHP compiled with RRDTool support to run the following PHP examples. If you compile PHP by hand then see: how to build the php rrdtool extension by hand. If you are using a distribution's pre-compiled PHP binary you should be able to install a second package with RRDTool support. You can verify that your PHP install is ready to go by running this:


Then search for "rrdtool" in the output and make sure that "rrdtool support" is enabled.

While going through each of the following steps you will notice that each call takes a couple of parameters and then one parameter that is just a string of options. The string of options is exactly how it is for generating/updating/graphing RRDs from the command line. This makes for a consistent interface for the different languages that have RRDTool support.


How to build the PHP rrdtool extension by hand