Code: Select all
apt-get install wget
Code: Select all
apt-get install vnstat
Code: Select all
cd /home/web
wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.4.1.tar.gz
tar xvfz vnstat_php_frontend-1.4.1.tar.gz
Code: Select all
mv vnstat_php_frontend-1.4.1 vnstat
chown -R www-data:users vnstat
4. Run vnstat to set up your databases for the interface(s) you want to monitor
Code: Select all
vnstat -u -i eth0
vnstat -u -i eth1
5. cd into the vnstat frontend directory
6. edit the config.php file to set your interfaces the right way round and add /usr/bin/vnstat to the $vnstat_bin protocol and you should be good to go
7. Now you may want to download and install the daemon script from the vnstat homepage if you want to run vnstat on reboot, or you can just start it manually. http://humdi.net/vnstat/init.d/debian/vnstat You can use update-rc.d to set it up as well. This is the debian equivalent of chkconfig
Code: Select all
cd /etc/init.d
wget http://humdi.net/vnstat/init.d/debian/vnstat
chmod a+x vnstat
update-rc.d -f vnstat defaults