--enable-extraprotection - compile sarg with extra GCC options for increased security
default: use standard compilation warnings and no protection
+ If compilation fails, try to configure sarg without this flag.
For a complete list of all the options, run ./configure --help.
+ Example:
+ ./configure --prefix=/usr --sysconfdir=/etc/sarg --enable-extraprotection
+
3. make
-4. make install
+4. sudo make install
+
+5. Go to /usr/local/sarg (or the path defined with --sysconfdir on configure)
+ and change sarg.conf to your liking. You may use sarg.conf provided along with
+ the sources as a template for your new sarg.conf. In any case, have a look at
+ the sample sarg.conf for new options.
+
+6. Install cron jobs to generate the reports.
+
+ For instance, create a file named /etc/cron.daily/sarg with the content:
+
+ #!/bin/sh
+ sarg -d day-1 -w /tmp/sarg.daily -o /var/www/squid-reports/Daily /var/log/squid3/access.log*
+
+ A weekly report is produced by /etc/cron.weekly/sarg:
+
+ #!/bin/sh
+ sarg -d week-1 -w /tmp/sarg.weekly -o /var/www/squid-reports/Weekly /var/log/squid3/access.log*
+
+ And the monthly report is created with /etc/cron.monthly/sarg:
-5. Go to /usr/local/sarg (or file entered with --sysconfdir on configure)
- and change sarg.conf as you need.
+ #!/bin/sh
+ sarg -d month-1 -w /tmp/sarg.monthly -o /var/www/squid-reports/Monthly /var/log/squid3/access.log*
-6. Notes about sarg:
+ Make sure all those files are executable:
- Date/Time report:
- Every minute that a request is logged your time is incremented by the smaller
- of 1 minute or the total time for the requests.
+ chmod 755 /etc/cron.daily/sarg /etc/cron.weekly/sarg /etc/cron.monthly/sarg
Usage: sarg -h
Alex Deiter <tiamat@komi.mts.ru> - Russian UTF-8 language
Josef Karliak <karliak@ajetaci.cz> - Czech UTF-8
Igor Ageikin <iageikin@lipen.elektra.ru> - Russian UTF-8 fix
+Joe Hansen <joedalton2 (at) yahoo (dot) dk> - Danish language
Suggestions or remarks