Bandwidthd on a cPanel Server

I recently had to install bandwidthd on a cPanel server. It’s a fairly simple process, with just a little bit of configuration required. This is for the latest version at the time of writing this (2.0.1) – but to check what the latest version is go to the website http://sourceforge.net/projects/bandwidthd/files/bandwidthd/.

Download Bandwidthd:
wget http://sourceforge.net/projects/bandwidthd/files/bandwidthd/bandwidthd%202.0.1/bandwidthd-2.0.1.tgz/download (replace the address with the correct version.) You can find that by right clicking and selecting “copy link address” or something similar on the correct version from this page http://sourceforge.net/projects/bandwidthd/files/bandwidthd/bandwidthd%202.0.1/ make sure the link has /download at the end.

Once that has downloaded run the following -

tar -zxvf bandwidthd-2.0.1.tgz

cd /root/to/bandwidthd-2.0.1

./configure && make install

You may get this error: “configure: error: Bandwidthd requires but cannot libpng” – install libpng-devel as well with:

yum install libpng-devel

Configure:

cd /root/to/bandwidthd-2.0.1

vi /root/to/bandwidthd.conf
set subnet mask (from ifconfig)

Start Bandwidthd:

/usr/local/bandwidthd/bandwidthd

Add the following to httpd.conf

Alias /bandwidthd “/usr/local/bandwidthd/htdocs”
<Directory “/usr/local/bandwidthd/htdocs”>
Order Allow,Deny
Allow from All
</Directory>

Restart apache.

Test:

http://YOUR-IP/bandwidth

Set user/password in cPanel:

Main >> Service Configuration >> Bandmin Password

This entry was posted in Development, Managed Hosting. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>