1.1 安裝squid需要gcc和g++。
./configure --prefix=/usr/local/squid
--enable-storieio=ufs緩存技術
--enable-arp-acl 對MAC地址進行管理
修改配置後需要使用/usr/local/squid/sbin/squid -k reconfigure來更新配置
1.2 因爲對文件的修改是使用nobody,所以要修改權限
對於文件權限的修改:
chown -R nobody /usr/local/squid/var/cache
chmod -R 755 /usr/local/squid/var/cache
* /usr/local/squid/var/logs同理。
1.3 squid -z 生成cache文件
cache_dir ufs /usr/local/squid/var/cache 100 16 256取消這個註釋。
1.4 acl
acl name src 192.168.1.0/28
acl name dst 202.1.1.1
acl name dstdomain www.cat.com
acl name dstdomain .cat.com 對有該後綴的地址限制
acl name urlpath_regex \.bt$
acl name urlpath_regex .com
acl name time MTWHF 8:20-12:00
1.5 http_access allow
http_access deny
http_access deny !name