From: Frédéric Marchal Date: Tue, 13 Nov 2012 17:57:37 +0000 (+0100) Subject: Update the install procedure X-Git-Tag: v2.3.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=472acd092c8760fbdca0809c084fabd34fd59074;p=thirdparty%2Fsarg.git Update the install procedure --- diff --git a/README b/README index b6def54..0eba462 100644 --- a/README +++ b/README @@ -34,21 +34,42 @@ Installation --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 @@ -125,6 +146,7 @@ Theo kastermans - Dutch language fix Alex Deiter - Russian UTF-8 language Josef Karliak - Czech UTF-8 Igor Ageikin - Russian UTF-8 fix +Joe Hansen - Danish language Suggestions or remarks