Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网站建设 > 服务器相关 > SQUID编译安装
【标  题】:SQUID编译安装
【关键字】:SQUID
【来  源】:http://www.cublog.cn/u/6797/showart.php?id=83501

SQUID编译安装

Your Ad Here 编译安装:
tar zxvf squid-2.5.STABLE9.tar.gz
cd squid-2.5.STABLE9
./configure --prefix=/usr/local/squid \
--enable-arp-acl \
--enable-linux-netfilter \
--enable-pthreads \
--enable-err-language="Simplify_Chinese" \
--enable-default-err-language="Simplify_Chinese" \
--enable-auth="basic" \
--enable-baisc-auth-helpers="NCSA" \
--enable-underscore

/usr/local/squid/sbin/squid -z #建立squid缓存目录
/usr/local/squid/var/cache、/usr/local/squid/var/logs两个目录的属主改为nobody,或者权限设为0777,否则squid不能启动

设置squid支持用户认证:

说明:透明代理和用户认证功能不能同时应用。否则用户认证功能不起作用。
假定squid source目录在/squid-2.5.STABLE9

2. # cd /squid-2.5.STABLE9/helpers/basic_auth/NCSA/
   # make ncsa_auth

3. 拷贝生成的执行文件ncsa_auth到squid执行文件目录
# cp ncsa_auth /usr/local/squid/bin

用户认证配置如下:
auth_param basic program /usr/local/squid/bin/ncsa_auth /usr/local/squid/etc/password
auth_param basic children 10
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 20 hours
acl normal proxy_auth REQUIRED
http_access allow normal
auth_param basic casesensitive off


注意事项:
acl normal proxy_auth REQUIRED语句定义的normal不需要用acl normal src xxx.xxx.xxx.xxx重新定义,系统会默认源IP为0.0.0.0/0,如果normal用acl语句重新定义了,squid启动会报如下错 误:aclParseAclLine: ACL 'normal' already exists with different type, skipping.

squid.conf中默认的http_access deny all必须注释,否则用户认证不能成功

某些配置讲解:
cache dir ufs /home/squid/cache 1024 16 256

---- #硬盘缓冲区的大小,大小为1GB,一级目录16个,二级目录256个。

---- cache access log /var/log/squid/access.log

---- #该log文件是用来描述每次客户请求HTTP内容时高速缓存命中或未命中的项目,同时还描述提出请求的主机身份及它们所需要的内容,它是用SQMGRLOG等软件分析记费的基础。

---- cache log /var/log/squid/cache.log

---- #用于描述当Squid守护进程启动时可以看到的内存容量、交换空间的大小、高速缓存目录的位置、所接受的连接类型以及接受连接的端口。

---- cache_store_log /var/log/squid/store.log

---- #用于描述页面从高速缓存中被调入调出的情况。

pid filename /var/run/squid.pid
#Squid进程的进程号。
dns nameservers 192.x.x.1
#定义域名解析服务器的地址。
cache_mgr squidadmin@your.domain
#cache管理员的邮件箱地址。
reference age 1 week
#设置缓冲区的更新周期。
maximum object size 4096 KB
#设置允许被缓存的一次性最大请求。
cache_effective_user squidadmin squidadmin
#以用户squidadmin的身份运行。


参考:http://www.moon-soft.com/download/info/2415.htm
      http://www.cublog.cn/opera/showart.php?blogid=12869&id=66756
      http://www1.stock1818.com/soft/Article.Asp?id=11763
Squid + Kerberos 笔记:【上一篇】
squid 配置详解+认证:【下一篇】
【相关文章】
  • Squid + Kerberos 笔记
  • Linux下挂载中文的FAT32分区和Squid(代理服务器)总结
  • iptables+squid透明代理+防火墙终极配置
  • MSN不能上去解决之道(Squid)
  • 学习SQUID时的参考文档,感觉永远是经典之作。
  • squid的安装
  • squid配置文件详解
  • 成功使用squid+iptables配置透明代理
  • squid反向代理webserver
  • iptable+SQUID 透明代理验证mac地址上网.
  • 【随机文章】
  • PHP的$_SERVER数组的内容
  • 比Ghost更强 给系统做影子分身术
  • 利用JS在页面上动态生成直线
  • flash中数组的妙用
  • uclinux中tftp下载的问题
  • 终于搞定了MapX的专题地图
  • XML真的是个好东东
  • HDLC中的特殊字段
  • OpenBSD 入门
  • 第十四章 简单数据库应用的创建及MASTAPP介绍(一)
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.