how to install sarg in CentOS / Redhat 6.x

Centos 6.0 sarg installation from yum gives you endless issues

 

lets start from source

 

[root@ajay~]# yum install gcc make wget httpd
[root@ajay ~]# wget http://sourceforge.net/projects/sarg/files/sarg/sarg-2.3.1/sarg-2.3.1.tar.gz/download

[root@ajay2 ~]# tar zxvf sarg-2.3.1.tar.gz
[root@ajay ~]# cd sarg-2.3.1
[root@ajay~]# ./configure
[root@ajay ~]# make

Modify sarf conf file

 

# vim /usr/local/etc/sarg.conf

#### sarg.conf####
access_log /var/log/squid/access.log
date_format e ## since here we use date format DD-MM-YYYY
overwrite_report yes ## because I don’t want multiple sarg reports for the same day
output_dir /var/www/html/squid-reports

 

[root@ajay ~]# sarg -x

 

If all goes well, there should be a report generated at /var/www/html/squid-reports directory which can be accessed from the web browser using the address http://IP/squid-reports

 

 

# crontab -e

30 2 * * * sarg

[root@ajay ~]# service crond restart
[root@ajay2 ~]# chkconfig crond on
 

 

It's only fair to share...Tweet about this on TwitterShare on Google+Share on FacebookShare on LinkedInEmail this to someone
Twitter Auto Publish Powered By : XYZScripts.com