從Squid 2.7到Squid 3.0的配置改變一覽
從1996年到現(xiàn)在,Squid發(fā)展了很長的時間。Squid 3.0的***個穩(wěn)定版在2007年底發(fā)布,與之前的2.x系列有一些不同。本文列舉一些常見的Squid 3.0與Squid 2.7在配置方面的不同之處。
Squid 3.0最重要的新特性:
- Code converted to C++, with significant internal restructuring and rewrites.
- ICAP implementation (RFC 3507 and www.icap-forum.org)
- Edge Side Includes (ESI) implementation (www.esi.org)
更多的請參考官方說明
來說說配置方法的不同之處(只說我自己實際使用的)
./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 系統(tǒng)會自己選擇***的I/O Loop Method
--enable-truncate 不再需要
--enable-follow-x-forwarded-for 沒有此項配置了
增加了以下選項:
--disable-mempools 相當于2.7配置文件里面的memory_pools off,適合內(nèi)存使用較大的情況,系統(tǒng)會調(diào)用free()來清除沒用到的緩存內(nèi)存
--with-maxfd=65535 相當于ulimit -n 65535,2.7配置文件里面的max_filedescriptors 65535
配置文件(squid.conf)差別
在Squid3.0版本的配置文件中,如下主要tag發(fā)生了變化
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的時候?qū)崿F(xiàn)
max_filedescriptors 刪除了此tag,在./configure的時候?qū)崿F(xiàn)
上面只列出了我自己實際配置Squid時,3.0版本和2.7版本的不同之處,關(guān)于更多的大家可以參考官方文檔。
參考文檔
http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE14-RELEASENOTES.html