一,安装包

chianunix.net 

squid-2.6.STABLE4.tar.gz

安装参数

./configure --prefix=/www/sqd/sqd/sqd --enable-basic-auth-helpers="NCSA"

二,安装配置

visible_hostname sqd289

auth_param basic program /www/sqd/sqd/sqd/libexec/ncsa_auth /www/sqd/sqd/sqd/libexec/passwd

http_port 3128

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?

cache deny QUERY

acl apache rep_header Server ^Apache

broken_vary_encoding allow apache

access_log /www/sqd/sqd/sqd/var/logs/access.log squid

refresh_pattern ^ftp:           1440    20%     10080

refresh_pattern ^gopher:        1440    0%      1440

refresh_pattern .               0       20%     4320

acl all src 0.0.0.0/0.0.0.0

acl manager proto cache_object

acl localhost src 127.0.0.1/255.255.255.255

acl to_localhost dst 127.0.0.0/8

acl SSL_ports port 443 563

acl CONNECT method CONNECT

acl auth_user proxy_auth REQUIRED

acl edong proxy_auth liangi289

http_access allow edong

http_access allow manager localhost

http_access deny manager

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access deny all

http_reply_access allow all

icp_access allow all

cache_effective_user nobody

cache_effective_group nobody

coredump_dir /www/sqd/sqd/sqd/var/cache

三,参数修改:

a,logs,cache文件的属主改为

      noboby.noboby

b,在 /www/sqd/sqd/sqd/libexec/目录下新建passwd文件并往其添加用户帐号及密码

      htpasswd -c /www/sqd/sqd/sqd/libexec/passwd liangi289

四,启动前的准备工作:

生成缓存目录

/www/sqd/sqd/sqd/etc/squid -z

启动过程显示在屏幕

   /www/sqd/sqd/sqd/etc/squid -N -d1

如果出现Ready to serve requests. 

则说明成功启动。

其他操作可以参考 http://debian.anheng.com.cn/news/28405.html

四,登录用户名密码

liangi289

liangi289

2009-09-16