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

系统 Linux
我们在参考有关Squid的资料时,可能会发现有些资料适用于老版本的Squid,但是自己使用的是当前最新的Squid 3.x版本,有些配置项并不通用。本文总结了一些常会用到的配置在Squid 2.7和Squid 3.0之间的不同之处。

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

Squid 3.0最重要的新特性:

  1. Code converted to C++, with significant internal restructuring and rewrites.
  2. ICAP implementation (RFC 3507 and www.icap-forum.org)
  3. 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

责任编辑:yangsai 来源: Blogbus
相关推荐

2011-03-15 15:47:25

Squidiptables

2009-07-16 14:09:24

Flex3到Flex4

2011-05-23 10:29:31

Fedora 15

2009-11-26 15:51:38

Squid开源系统

2011-03-31 14:28:15

2011-03-31 14:44:55

cactisquid监控

2011-03-31 13:40:48

2015-01-22 10:13:50

Windows 10

2009-11-30 13:26:25

Suse代理SQUID

2012-04-02 17:27:06

rhelsquid

2010-10-14 16:55:00

MySQL联结查询

2009-03-03 20:44:06

桌面虚拟化Xendesktop虚拟化

2017-03-06 16:34:12

虚拟个人助理

2020-02-17 15:29:00

石墨文档

2012-09-18 09:50:41

2010-09-14 10:02:39

获取Squid

2011-01-11 09:53:28

linux进程

2021-06-08 09:47:44

Java面向对象

2010-11-15 09:55:35

Oracle转换函数

2019-04-26 14:21:34

手机色彩苹果
点赞
收藏

51CTO技术栈公众号