$ sudo apt-get install squid3
$ sudo nano /etc/squid3/squid.conf
acl localnet src 192.168.0.0/24 http_access allow localnet http_port 8080 cache_mem 200 MB maximum_object_size_in_memory 4 MB maximum_object_size 100 MB cache_dir ufs /var/spool/squid3 10000 16 256 #request_header_access Referer deny all request_header_access X-Forwarded-For deny all request_header_access Via deny all request_header_access Cache-Control deny all forwarded_for off
#設定ファイルの構文チェック $ sudo squid3 -k parse $ sudo /etc/init.d/squid3 restart
squid3-clientをインストール
$ sudo apt-get install squid3-client
Hit率確認
$ squidclient -p 8080 mgr:client_list
ログ解析www.tecmint.com
$ sudo apt-get install sarg $ sudo nano /etc/sarg/sarg.conf access_log /var/log/squid3/access.log output_dir /var/www/html/squid-reports overwrite_report yes charset UTF-8 #charset Japan #上記設定エラーがでて文字化けする $ sudo sarg -x 定期更新 $ sudo crontab -e * */1 * * * /usr/bin/sarg -x