09
Jun
09

Install and Configure SARG for Dansguardian on CentOS

i’ve tested and it works…you shoul try it, link from here
Install and Configure SARG for Dansguardian on CentOS

Install and Configure SARG to report against Dansguardian log files on CentOS

Go back to the main project page

By this point, you should already have DansGuardian and Squid cache installed, configured, and tested. If not, please visit the Open Source Web Content Filtering Project page to finish that part of the setup.

There is other settings I’m looking into with regards to DansGuardian. This is just a rough way to get SARG up and reporting.

Install Apache

* yum install httpd – install Apache if not already installed

Add ports to firewall

* You may need to add a firewall rule to allow port 80
* vi /etc/sysconfig/iptables – add the following lines, if they don’t already exist
* -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

Install SARG

* cd /usr/src – optional, this is just where I like to keep the source archives
* wget http://dag.wieers.com/rpm/packages/sarg/sarg-2.2.1-1.el4.rf.i386.rpm – download the SARG rpm to your /usr/src folder
* yum install gd gd-devel
* rpm -i /usr/src/sarg-2.2.1-1.el4.rf.i386.rpm – install SARG using the Red Hat Package manager
* vi /etc/httpd/conf.d/sarg.conf

* add an additional Allow from line for each computer you want to be able to see the reports, or comment out the Deny from all, and Allow from lines to give access to all.

Configure DansGuardian and SARG to work with each other

* vi /etc/dansguardian/dansguardian.conf

* change the setting logfileformat to equal 3 – sets DansGuardian to log in squid log file format
* :wq – save the changes to the file and quit

* vi /etc/sarg/sarg.conf

* change the setting access_log to point to your dansguardian logs. Under default settings, it should be /var/log/dansguardian/access.log
* change any other settings you want to change
* :wq – save the changes to the file and quit

* Check the sarg scripts in the cron folders. You will need to make some changes to point to the DansGuardian log files

* vi /etc/cron.daily/sarg – really no changes here
* vi /etc/cron.weekly/sarg – change the log file paths to the path of your DansGuardian log files
* vi /etc/cron.monthly/sarg – change the log file paths to the path of your DansGuardian log files

* /usr/bin/sarg – run sarg to create a ONE-SHOT report

Start Apache

* /etc/init.d/httpd start – Start Apache

Test Configuration

* browse to your DansGuardian machine using your favorite internet browser. You will have to add /sarg to the end of the url. (ex. http://192.168.0.1/sarg Check to make sure the ONE-SHOT report was generated.

* wait for the cron jobs to run and generate the rest of the reports

Done


2 Responses to “Install and Configure SARG for Dansguardian on CentOS”


  1. 1 sq
    August 17, 2009 at 10:24 am

    i followed your config but i got this error

    [root@localhost /]# /usr/bin/sarg
    SARG: Records in file: 0, reading: 100.00%
    SARG: No records found
    SARG: End
    [root@localhost /]#

    • 2 sq
      August 17, 2009 at 10:32 am

      i went to localhost/sarg and i manage to see the html page but when i click on the one-short report it says
      Not Found
      The requested URL /sarg/ONE-SHOT/index.html was not found on this server.
      Apache/2.2.3 (Red Hat) Server at localhost Port 80.

      how do i fix this. i man running dansguardian + squid at the same time. i realize that other people is putting their access_log as access_log /var/log/squid/access.log/ but anyway do i need to point the apache to listen to port 8080 instead? i redirect port 80 to 8080.


Leave a Reply




 

June 2009
M T W T F S S
« May   Jul »
1234567
891011121314
15161718192021
22232425262728
2930  

Quote

"I am a traveler seeking the truth, a human searching for the meaning of humanity and a citizen seeking dignity, freedom, stability and welfare under the shade of Islam. I am a free man who is aware of the purpose of his existence and who proclaims: “Truly, my prayer and my sacrifice, my living and my dying are all for Allah, the Lord of the worlds; no partner has He. This, am I commanded and I am of those who submit to His Will.” This is who I am. Who are you?" (Hassan al-Banna)

Online

tracker

Your IP Address

Kalender Hijriyah

Blog Stats

  • 20,070 hits

Qur’an Flash

Powered by