Installation of Sarg on RedHat Linux
The procedure for installation of SARG (Squid Analysis Report Generator) is given below:
Download the Source tar from the site : http://web.onda.com.br/orso/sarg.html
Do not forget to download the patch. The file is available from here and the patch here.
Copy the file in a suitable directory under your home.
The list of commands run is given below:
# tar -xvf sarg-1.4.1.tar.gz
# cd sarg-1.4.1
# ./configure
# make
# make install
Now copy the patch file sarg-1.4.1-index.sort.patch in the directory sarg-1.4.1
and run the command :
# patch -p0 < sarg-1.4.1-index.sort.patch
# make install
The data output can be modified from the file sarg.conf located in /usr/local/sarg
subdirectory. The input directory for the access log file is by default /var/log/squid/access_log.
However, in your case, if its different please change it in the sarg.conf file.
Similarly, the output directory is /var/www/html/squid-reports/. However, you
can change it to suit your requirements. You can as well decorate the page and
set your own fonts and other headers etc.
For getting the users' names, create a *usertab* as found in the sarg.conf
file.
For running the log analysis tool just login as root and run # sarg &.
For scheduling
the job, you can put it in the cron. The appropriate line that needs to be put
in the crontab is :
# minutes hours day-of-month month weekday command.
00 23 * * * 1-7 sarg
If you want to
know about new releases and/or changes, subscribe
to the Email list.