本文有些过时了,但很具有参考价值
内核版本: Linux 2.2
Squid版本: Squid-2.3.stable2(http://www.squid-cache.org/Versi ... STABLE2-src.tar.gz)
发行版本: Redhat Linux 6.0
1. 下载,编译,安装Squid略
注意:运行squid作为nobody,不能用root.
假定squid home目录为/usr/local/squid/
假定squid source目录在/tmp/squid-2.3.STABLE2
2. # cd /tmp/squid-2.3.STABLE2/auth_modules/NCSA
[code]# make ncsa_auth[/code]
3. 拷贝生成的执行文件
拷贝生成的执行文件ncsa_auth到squid执行文件目录
[code]# cp ncsa_auth /usr/local/squid/bin[/code]
4. 从Apache软件包中得到程序htpasswd
5.生成文件
用htpasswd生成供Squid利用的用户名和密码认证数据库文件
[code]#htpasswd -c /usr/local/squid/etc/passwd[/code]
6. 加其它更多的用户
[code]#htpasswd /usr/loal/squid/etc/passwd[/code]
7. 修改squid.conf,enable ncsa_auth用户认证功能
[code][root@linux etc]# more squid.conf | grep ncsa_auth
authenticate_program /usr/local/squid/bin/ncsa_auth /usr/local/
squid/etc/passwd[/code]
8.修改ACL部分
象下面这样:
[code][root@linux etc]# more squid.conf | grep jephe
acl isd proxy_auth jephe bob jicon
http_access allow isd[/code]


syncode 于 2006-08-31 21:49:50发表:
有参考价值就支持下