+++++++++++配置透Squid日志分析系统+++++++++++
[root@localhost ~]#yum -y install gd gd-devel
[root@localhost ~]#tar -zxvf sarg-2.3.7.tar.gz -C /usr/src/
[root@localhost ~]#cd /usr/src/sarg-2.3.7/
[root@localhost sarg-2.3.7]#./configure
--prefix=/usr/local/sarg
--sysconfdir=/etc/sarg
--enable-extraprotection
[root@localhost sarg-2.3.7]#make && make install
[root@localhost ~]# vim /etc/sarg/sarg.conf
添加:
access_log /usr/local/squid/var/logs/access.log
title "Squid User Access Reports"
output_dir /var/www/html/sarg
user_ip no
topuser_sort_field BYTES reverse
user_sort_field BYTES reverse
exclude_hosts /usr/local/sarg/noreport
overwrite_report no
mail_utility mail.postfix
charset UTF-8
weekdays 0-6
hours 7-12,14,16,18-20
www_document_root /var/www/html
[root@localhost ~]# service httpd restart
客户端:
[root@localhost ~]# firefox http://192.168.1.1/sarg &
文章转载自Devops栈,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。





