Collectd installation on Debian

apt-get install collectd lighttpd php5-cgi rrdtool perl librrds-perl libconfig-general-perl libcurl3-gnutls libsensors4 librrds-perl librrd4 libhtml-parser-perl default-jre-headless libregexp-common-perl

cp -fa /usr/share/doc/collectd/examples/collection3 /var/www/
chown -R www-data:www-data /var/www/collection3/
mkdir /usr/lib/cgi-bin/collectd
cp -fa /usr/share/doc/collectd/examples/collection.cgi /usr/lib/cgi-bin/collectd/

configure cpan
cpan
cpan Config::General
cd /etc/lighttpd/conf-enabled
ln -s 10-cgi.conf ../conf-available/10-cgi.conf
ln -s 10-fastcgi.conf ../conf-available/10-fastcgi.conf
ln -s 15-fastcgi-php.conf ../conf-available/15-fastcgi-php.conf
ln -s 90-javascript-alias.conf /etc/javascript-common/lighttpd.conf

/etc/lighttpd/lighttpd.conf

server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
)

server.port = 80
server.document-root = "/var/www/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"

index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"index.cgi", "index.lighttpd.html" )

url.access-deny = ( "~", ".inc" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi" )

dir-listing.encoding = "utf-8"
server.dir-listing = "enable"

compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )

include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

/var/www/collection3/index.html

<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://home-server/collection3/bin/index.cgi">
</head>
</html>

/etc/init.d/lighttpd restart