• Squid3.0与2.7的配置差异 - [技术笔记]

    2009-04-14

    分类: 技术笔记

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://iyubo.blogbus.com/logs/37887784.html

    Squid3.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    系统会自己选择最优的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


    收藏到:Del.icio.us