沧海笑一声

Squid2.6反向代理实现多个Web缓存加速--Config More Web Cache Acceleration with Squid Transparent Proxy[安装文档]

Squid反向代理实现Web缓存加速

--Config Web Cache Acceleration with Squid Transparent Proxy

 

Step I - Downloading and compiling Squid

wget http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE3-20060823.tar.gz

[root@localhost software]# tar zxvf squid-2.6.STABLE3-20060823.tar.gz

[root@localhost software]# cd squid-2.6.STABLE3-20060823

[root@localhost squid-2.6.STABLE3-20060823]# vi config.sh

写入内容如下:

代码:

#!/bin/bash

SQUID_ROOT="/Data/apps/squid"

 

./configure --prefix=$SQUID_ROOT \

--enable-useragent-log \

--enable-referer-log \

--enable-default-err-language=Simplify_Chinese \

--enable-err-languages="Simplify_Chinese English" \

--disable-internal-dns \

--enable-dlmalloc \

--with-pthreads \

--enable-poll \

--enable-stacktrace \

--enable-removal-policies="heap,lru" \

--enable-delay-pools \

--enable-storeio="aufs,coss,diskd,ufs"

[root@localhost squid-2.6.STABLE3-20060823]# sh config.sh

[root@localhost squid-2.6.STABLE3-20060823]# make

[root@localhost squid-2.6.STABLE3-20060823]# make install

 

 

 

Step II - Basic Configuration

 

[root@localhost squid-2.6.STABLE3-20060823]# cd /Data/apps/squid/

[root@localhost squid-2.6.STABLE3-20060823]# mkdir cache

[root@localhost squid-2.6.STABLE3-20060823]# chown squid.squid *

 

/etc/hosts中:加入内部的DNS解析,比如:


211.100.99.100  longrujun.name

211.100.100.101  blog.hanlei.name

61.135.100.100  www.liuren.com

60.195.200.159  www.keso.cn

 

Bvi /Data/apps/squid/etc/squid.conf

 squid.conf

Step III - Starting Squid

 

A、创建缓存目录

[root@redhatas4 sbin]# ./squid –z

 

B、测试Squid运行状况

 

[root@redhatas4 sbin]# ./squid –NCd1

成功后将出现"Ready to serve requests".否则请检查配置文件

C

启动Squid

/Data/apps/squid/sbin/squid

停止 Squid

/Data/apps/squid/sbin/squid –k shutdown
启用新配置:
/Data/apps/squid/sbin/squid -k reconfig
通过crontab每天0点截断/轮循日志:
0 0 * * * (/Data/apps/squid/sbin/squid -k rotate)

 

Published 2006年8月25日 9:29 by admin Filed under: , ,

Trackback: http://tb.donews.net/TrackBack.aspx?PostId=1016032


[点击此处收藏本文]  发表于2006年08月25日 4:21 PM




正在读取评论……

发表评论

大名:
网址:
验证码
评论 
   

news

Shared Reading

导航

blog stats

文章

收藏

相册

A.Technology Forum

B.Read @ a day

C.Friends

D.体验IT

存档


正在读取评论……