在Windows上安装Squid

在Windows上安装Squid

采用Squid 2.7 stable5版本,假定安装到E:/squid目录下。
1)下载http://squid.acmeconsulting.it/download/squid-2.7.STABLE5-bin.zip软件,并解压缩到E:/squid;
2)修改E:/squid/etc/squid.conf文件,假定采用用户名/口令(ncsa_auth)认证,限制用户最多10个并发连接:

auth_param basic program e:/squid/libexec/ncsa_auth.exe e:/squid/etc/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server cill
auth_param basic casesensitive off
acl numconn maxconn 10
acl internet proxy_auth REQUIRED
http_access deny numconn internet
http_access allow internet
http_port 8080
cache_dir ufs e:/squid/var/cache 10000 16 256
access_log e:/squid/var/logs/access.log squid
logfile_daemon e:/squid/libexec/logfile-daemon.exe
cache_log e:/squid/var/logs/cache.log
cache_store_log e:/squid/var/logs/store.log
mime_table e:/squid/etc/mime.conf
pid_filename e:/squid/var/logs/squid.pid
diskd_program e:/squid/libexec/diskd-daemon.exe
unlinkd_program e:/squid/libexec/unlinkd.exe
icon_directory e:/squid/share/icons
error_directory e:/squid/share/errors/English
coredump_dir e:/squid/var/cache

3)创建目录
E:/squid/sbin>md e:/squid/var/cache
E:/squid/sbin>squid -z -f e:/squid/etc/squid.conf

4)安装并启动服务
E:/squid/sbin>squid.exe -i -f e:/squid/etc/squid.conf -n SquidCache
E:/squid/sbin>net start squidcache

5)使用htpasswd命令创建用户名和密码,并写入到E:/squid/etc/passwd文件中。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值