LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-02-2006, 10:00 PM   #1
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
add squidquota.pl as a redirector


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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
squid complaining about redirector processes lewus Linux - Software 0 02-08-2005 01:31 AM
add CD-ROM? add Floppy? Devices? Kelphyr Slackware 5 10-10-2004 06:17 PM
kdevelop add folder and add new class is slow edwardt Programming 0 03-03-2004 06:04 PM
Cant add MySQL through add/remove programs Hero Doug Fedora 6 01-03-2004 10:35 PM
Miss Match IP Add and Adapter Add. ???? hitesh_linux Linux - Networking 5 02-08-2003 01:34 PM


All times are GMT -5. The time now is 10:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration