首页

squid-2.6.tar.gz安装包for linux版本下载

标签:Squid代理缓存,代理服务器软件,代理上网,HTTP代理,反向代理,squid-cache,缓存服务器     发布时间:2016-04-26   
  • 云盘下载:
  • [提取码:0000]
  • 官方下载:
  • 本地下载:
       ( 需积分:2  )

一、软件简介

Squid-cache(简称'Squid')是GNU许可认证的代理服务器和web缓存加速服务器。常用做正向代理服务器、反向代理服务器及web缓存加速服务器等。

二、安装配置

1. 安装配置脚本

>tar -zxvf squid-2.6.tar.gz>cd squid-2.6>./configure --enable-linux-netfilter--prefix=/usr/local/squid2.6 --enable-underscores --enable-gnuregex--enable-delay-pools --enable-kill-parent-hack --enable-arp-acl--enable-ssl>make all>make install>vi /usr/local/squid2.6/etc/squid.conf...http_port 3128 transparent...visible_hostname netgate(hostname命令的返回值)...注明内网的网段:acl our_networks src 192.168.0.0/22http_access allow our_networks

2. 策略脚本

acl btfile urlpath_regex -i .torrent$  #禁止下载后缀名为“.torrent”的文件acl notbt url_regex -i btn             #可以打开url中含有“btn”的链接acl btdenywords url_regex -i bt        #禁止打开url中含有“bt”(大小写均匹配)的链接http_access allow notbthttp_access deny btdenywordshttp_access deny btfile#禁止登录的网站:acl deny_address dstdomain .qq.com .verycd.comhttp_access allow !deny_address>chown -R nobody /usr/local/squid2.6/var/logs/>mkdir -p nobody /usr/local/squid2.6/var/cache>chown -R nobody /usr/local/squid2.6/var/cache/建立缓存:>/usr/local/squid2.6/sbin/squid -z>/usr/local/squid2.6/sbin/squid -N -d1

3 .修改squid.conf文件之后,重新读取配置的命令是

/usr/local/squid2.6/sbin/squid -k reconfigure

4. 如果想某些页面(需要该页面的IP)不缓存,则在iptables设置里面(转发3128句之前)添加一句

iptables -t nat -A PREROUTING --dst $IP -j ACCEPT

@b@