服务器
当前位置:服务器首页 >> Linux操作系统 >> 服务器squid 2.5 stable快速安装指南
服务器squid 2.5 stable快速安装指南
2009-08-16 23:43:13  作者:Linux  来源:服务器  浏览次数:0  文字大小:【】【】【
  •      目标:在网关上为内网提供普通代理以及透明代理服务,以ip地址为访问控制条件,不需要其他访问控制。   #安装   #如果是FreeBSD,建议安装如下ports:   cd /usr/ports/devel/autoconf   make clean   m ...

  目标:在网关上为内网提供普通代理以及透明代理服务,以ip地址为访问控制条件,不需要其他访问控制

  # TAG: no_cache

  # A list of ACL elements which, if matched, cause the request to

  # not be satisfied from the cache and the reply to not be cached.

  # In other words, use this to force certain objects to never be cached.

  #

  # You must use the word %26#39;DENY%26#39; to indicate the ACL names which should

  # NOT be cached.

  #

  #We recommend you to use the following two lines.

  acl QUERY urlpath_regex cgi-bin ? asp php shtml php3 cgi

  no_cache deny QUERY

  # ACCESS CONTROLS


  #安装

  #如果是FreeBSD,建议安装如下ports:

  cd /usr/ports/devel/autoconf

  make clean

  make install clean

  cd /usr/ports/devel/automake

  make clean

  make install clean

  #首先,配置好你的网络,保证安装squid的主机能正常上网;

  ping www.163.com

  #用域名是为了测试DNS解析;

  #以下以root身份执行

  #获得最新stable源码

  http://www.squid-cache.org

  mkdir -p /usr/local/src/distfiles

  cd /usr/local/src/distfiles

  #FreeBSD

  fetch http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE1.tar.gz

  #Linux

  wget http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE1.tar.gz

  tar xfz squid-2.5.STABLE1.tar.gz -C ..

  cd ../squid-2.5.STABLE1

  ./configure --prefix=/usr/local/squid

  make

  make install

  #权限改变是必要的;参考squid.conf

  #cache_effective_user nobody

  #cache_effective_group nobody

  #默认使用

  chown -R nobody:nobody /usr/local/squid/var

  #按照你的需要配置;

  #vi /usr/local/squid/etc/squid.conf

  # TAG: http_port

  # Usage: port

  # hostname:port

  # 1.2.3.4:port

  #Default:

  # http_port 3128

  http_port 60080

  #逃避讨厌的代理扫描,使用一个自定义的端口;

  #设置不代理的url,一些动态网页,比如江湖、聊天

0

顶一下

0

踩一下