hi there,
i've been looking for a way to limit the monthly downloads of squid on a per user bases. i've looked at using squish, but there is dead set no documentation, now i'm trying 'squidquota' with next to no documentation. this is all they have.
I need to add squidquota.pl as a redirector, can someone help me out?
README for SquidQuota
What it is
~~~~~~~~~~
SquidQuota is a quota system for squid. You can limit the usage of your internet users. What you need is a database, perl, a webserver and of course squid. The configuration for mysql and postgres are already included. It should be easy to translate these examples to your favorite database.
Quick-Install-Guide
~~~~~~~~~~~~~~~~~~~
1. Read the configuration file. There are many explaining comments in the config file.
2. Install the files of the htdocs directory to your webserver directory. If you didn't want to show the actual database contents limit the access to squidquotastatistik.cgi or delete that file. If you use auth in squid squidquotauserstatistik.cgi will show the stats for the authenticated user.
3. Start builddb.pl. For testing use the debug mode (-d). Please note: if you use postgres use the -n flag after your first run. It could be that you have to install some cpan modules.
4. Include squidquota.pl in squid. If you are already using a redirector look for manyplex on the SquiVi2 homepage (
http://squivi2.sf.net/).
http://squivi2.sourceforge.net/en/index.html
now this is what i've done.
1. download the squidquota program from
http://squivi2.sf.net/
2. download the required perl source from
http://www.cpan.org
Bit::Vector -
http://search.cpan.org/dist/Bit-Vector/
Carp::Clan -
http://search.cpan.org/dist/Carp-Clan/
DBD::Pg -
http://search.cpan.org/dist/DBD-Pg/
Date::Calc -
http://search.cpan.org/dist/Date-Calc/
File::Tail -
http://search.cpan.org/dist/File-Tail/
File::Type -
http://search.cpan.org/dist/File-Type/
Unix::Syslog -
http://search.cpan.org/dist/Unix-Syslog/
Config::General -
http://search.cpan.org/dist/Config-General/
Time:
ate -
http://search.cpan.org/dist/time-date/
3. install the following files in order (that way all the Pre-requisites are forfilled)
Carp-Clan-5.3.tar.gz
Bit-Vector-6.4.tar.gz
DBD-Pg-1.43.tar.gz
Date-Calc-5.4.tar.gz
File-Tail-0.99.3.tar.gz
File-Type-0.22.tar.gz
Unix-Syslog-0.99.tar.gz
Config-General-2.30.tar.gz
TimeDate-1.16.tar.gz
4. make the following directory for the squidquota installation
mkdir /usr/local/squidquota
place the 'squidquota_1.0.3.tar.gz' in the '/usr/local/squidsquota' directory
5. unzip the squidquota file
gzip -d squidquota_1.0.3.tar.gz
tar-xf squidquota_1.0.3.tar
6. edit the 'quidquota.conf' file to show where your '.conf' files are
include /usr/local/squidquota/etc/mysql.conf
include /usr/local/squidquota/etc/squidquotastatistik.conf
include /usr/local/squidquota/etc/squidquotauserstatistik.conf
7. edit the 'squidquota.cgi' file to show where your 'squidquota.conf' files is
my $configFile = '/usr/local/squidquota/etc/squidquota.conf'
8. edit the 'squidquotauserstatistik.cgi' file to show where your 'squidquota.conf' files is
my $configFile = '/usr/local/squidquota/etc/squidquota.conf'
9. edit the 'squidquotastatistik.cgi' file to show where your 'squidquota.conf' files is
my $configFile = '/usr/local/squidquota/etc/squidquota.conf'
10. copy the files from htdocs into the cgi-bin of your webserver
cp -rf htdocs/ /var/www/cgi-bin/
11. install the builddb.pl
'/usr/local/squidquota/bin/builddb.pl -c /usr/local/squidquota/etc/squidquota.conf'
12. set the root password for mysql
'mysqladmin -h localhost -u root -p password mysqlpassword'
13. edit the database part of '/usr/local/squidquota/etc/squidquota.conf'
dbtype = mysql
#dbtype = Pg
database = test
# mysql
dsn = DBI:${dbtype}:database=${database};host=127.0.0.1;port=3306
#dsn = DBI:${dbtype}:database=${database}
# postgresql
#dsn = dbi:${dbtype}:dbname=${database};host=127.0.0.1;port=5432;
#dsn = dbi:${dbtype}:dbname=${database}
dbuser = root
dbpass = mysqlpassword