To be exact – how to monitor web browsing usage.
I’m delighted to found that it’s very easy to setup in FC3. Just follow these steps:
- Install Squid: yum install squid
- Download sarg: wget http://www.mack.ro/linux/sarg/sarg-2.0.9-2.fc3.mack.i386.rpm
- Install sarg: rpm -ihv sarg-2.0.9-2.fc3.mack.i386.rpm
- Configure squid.
At minimum, here’s what you’ll need to do:
- Edit /etc/squid/squid.conf
- Find http_access allow localhost
- Replace that line with these:
acl our_networks src 192.168.10.0/24 localhost
http_access allow our_networks
- Put this line: visible_hostname [your_server’s_hostname]
(your server’s hostname can be found out by typing hostname)
- I’m quite sure that’s the minimum that you need to do before you can run squid, but I’m typing this from my memory, so please feel free to correct any mistake.
- Set squid to be automatically run everytime the server starts: chkconfig squid on
- Run squid now: service squid start
- Now set the users’ browser to use squid. Point its proxy server setting to squid server’s IP address, and port 3128.
- After a while, the data will start to accumulate in squid’s logs. To process them, type: sarg
This takes a while, because the reports it produces are quite comprehensive.
- To view the report from the server where sarg was run, type: links /var/www/sarg/ONE-SHOT/index.html
(or substitute links with lynx if that’s what you got)