Chinaunix首页 | 论坛 | 博客
  • 博客访问: 125973
  • 博文数量: 20
  • 博客积分: 536
  • 博客等级: 中士
  • 技术积分: 295
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-14 11:04
文章分类
文章存档

2013年(4)

2012年(16)

我的朋友

分类: LINUX

2012-05-09 14:57:23

今天无聊尝试了下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

 

阅读(1667) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:变态的批量添加用户脚本

给主人留下些什么吧!~~