Today i have successfully installed and configured SARG on my work ClearOS 6.x based router. Main goal was to get better reports from existing data.
What we need is:
- ClearOS 6.x
- working squid configuration (web proxy)
- working apache configuration (web server)
- working dhcp server (dhcp server)
- Installing WGET
1# yum --enablerepo=clearos-core install wget - Installing RPMForge repo
12# wget http://apt.sw.be/redhat/el6/en/i386/dag/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm# rpm -ivh rpmforge-release-0.5.3-1.el6.rf.i686.rpm
Now we have to disable rpmforge repo to avoid conflicts between different software (for example during yum update process). You have to edit /etc/yum.repos.d/rpmforge.repo and change enabled=1 to 0 (zero). - Installing SARG
1# yum --enablerepo=rpmforge-testing install sarg - Configuring SARG
You can edit /etc/sarg/sarg.conf to modify any variables you want. Also we have to fix problem with subdirectories
1234# mkdir /usr/share/sarg/# ln -s /etc/sarg/fonts/ /usr/share/sarg/# ln -s /etc/sarg/languages/ /usr/share/sarg/# ln -s /etc/sarg/images/ /usr/share/sarg/ - Testing SARG – generate one-shoot report
1# sarg -x - Access SARG reports from your IP
To see reports generated by SARG you have to edit “/etc/httpd/conf.d/sarg.conf” and the line “# Allow from your-workstation.com” to the IP of your workstation. You can add as many IP as you want. After that it is required to restart webserver
1# service httpd restart - Testing SARG scripts
123# /etc/cron.daily/sarg# /etc/cron.weekly/sarg# /etc/cron.monthly/sarg
There should be no information after running those scripts - The end
If feverything goes ok, you should visit http://you-server-ip/sarg/ to see reports generated by SARG 🙂
ps. Thanks Tony Ellis from clearfundation forum for tips how to do it right.