今天无聊尝试了下squid 3.0
感觉配置比2.6 简单的不少。
源码包 squid-3.0.STABLE5.tar.gz
#解压:
tar xzvf squid-3.0.STABLE5.tar.gz
#进入安装目录
cd squid-3.0.STABLE5
#编译
./configure –prefix=/usr/local/squid
make all
make install
#编辑配置文件 /usr/local/squid/etc/squid.conf
visible_hostname squid1.fuck.com
http_port 80 accel vhost vport
cache_mem 512 MB
maximum_object_size_in_memory 2048 KB
memory_replacement_policy lru
cache_dir ufs /tmp 512 16 256
logformat combined %>a %ui %un [%tl] “%rm %ru HTTP/%rv” %Hs %
h” “%{User-Agent}>h” %Ss:%Sh
access_log /usr/local/squid/var/logs/page_zs_access_log combined
pid_filename /usr/local/squid/var/logs/squid.pid
cache_store_log none
dns_testnames localhost
http_access allow all
cache_log /var/log/squid/cache.log
acl QueryString url_regex \.php?
no_cache deny QueryString
maximum_object_size 320010 KB
maximum_object_size_in_memory 100 KB
cache_peer parent 80 0 no-query originserver
cache_peer_domain fuck
#创缓存目录
cd /usr/local/squid/sbin
./squid –z
#启动
./squid –Nd1
阅读(1687) | 评论(0) | 转发(0) |