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
转载于:https://blog.51cto.com/doracat/607661