从Squid 2.7到Squid 3.0的配置改变一览


从1996年到现在,Squid发展了很长的时间。Squid 3.0的第一个稳定版在2007年底发布,与之前的2.x系列有一些不同。本文列举一些常见的Squid 3.0与Squid 2.7在配置方面的不同之处。

Squid 3.0最重要的新特性:

更多的请参考官方说明

来说说配置方法的不同之处只说我自己实际使用的)

./configure的配置项

./configure
--prefix=/usr/local/squid
--with-large-files
--enable-useragent-log
--enable-referer-log
--enable-linux-netfilter
--enable-x-accelerator-vary
--disable-internal-dns
--disable-mempools
--with-maxfd=65535

3.0版本去掉了以下选项:

--enable-dlmalloc    不再需要

--enable-epoll    系统会自己选择最优的I/O Loop Method

--enable-truncate     不再需要

--enable-follow-x-forwarded-for    没有此项配置了

增加了以下选项:

--disable-mempools    相当于2.7配置文件里面的memory_pools off,适合内存使用较大的情况,系统会调用free()来清除没用到的缓存内存

--with-maxfd=65535    相当于ulimit -n 65535,2.7配置文件里面的max_filedescriptors 65535

配置文件squid.conf)差别

在Squid3.0版本的配置文件中,如下主要tag发生了变化

acl    去掉了对src为all的定义,已集成;对protocol的定义简写为proto

http_port     去掉了选项http11和act_as_origin;增加了类型http_status

cache_peer    去掉了选项http11

header_access    删除了此tag,以request_header_access和reply_header_access取代

server_http11    删除了此tag

incoming_rate    删除了此tag

memory_pools    删除了此tag,在./configure的时候实现

max_filedescriptors    删除了此tag,在./configure的时候实现

上面只列出了我自己实际配置Squid时,3.0版本和2.7版本的不同之处,关于更多的大家可以参考官方文档。

参考文档

http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE14-RELEASENOTES.html

相关内容

    暂无相关文章