LightSquid installation Steps – Squid Graphical Report Viewer

Published June 26, 2010 by Siva

Installation Instructions:

Required software:

  1. Perl
  2. http server (Apache, lighthttpd, etc)
  3. Squid
  4. Cron

or equivalent

in example i use Apache

1. Extract lightsquid.tgz into any folder

cd /var/www/htdocs/
mkdir lightsquid
cd lightsquid
tar -xzf lightsquid.tgz

set ‘executable’ flag for scrip

chmod +x *.cgi
chmod +x *.pl

change owner

chown -R apache:apache *
(where apache = httpd user)

2. Configure your Apache server

.cgi files must execute as CGI scrip

<Directory "/var/www/html/lightsquid">
   AddHandler cgi-script .cgi
   AllowOverride All
</Directory>

Restart apache

3. Edit lightsquid.cfg

4. If you want GROUP reports – edit group.cfg

format:

esl           01            SysAdmin
karlos       01            SysAdmin
thy           01            SysAdmin
Ivanov     02            Developer
Ivanov2    02            Developer
Petrov      03            Commerial
Petrova    03            Commerial
vasyav     04            room 312
petyava    04            room 312

5. If you want use REALNAME – edit realname.cfg

format:

esl           Sergey Erokhin
karlos       Super User1
thy           Tech Good
Ivanov     Developer numer one
Ivanov2    Developer numbe two
Petrov      Good Commerial
Petrova    Bad Commerial
vasyav     Some User1
petyava    Some User2

6. if you want graphics report

check graph report

7. run check-setup.pl

if all done try next step
else check config file.

8. Try run lightparser.pl

if everything is ok no messages will be produced

parse old statistic
./lightparser.pl access.log.1.{gz|bz2}
./lightparser.pl access.log.2.{gz|bz2}
./lightparser.pl access.log.3.{gz|bz2}

9. Try to use lightsquid

Using your favorite browser enter http://<host where we live>/lightsquid/

10. Setup crontab to run lightparser once per hour

crontab -e
This example will execute parser every 20 minutes

*/20 * * * * /var/www/htdocs/lightsquid/lightparser.pl today

if you have small log and fast machine, you may run lightparser with smaller delay
warning not set interval less 10 min

11. All done!

You Can Access Via :

http://Youripaddresshere/lightsquid

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: