windows中squid更改默认安装路径配置说明

官网下载的windows版本,默认是要放c:\squid中,如果需要改默认路径的话,需要etc\squid.conf文件中至少增加如下配置

# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs G:/apps/squid2/var/cache/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir G:/apps/squid2/var/cache/squid
mime_table G:/apps/squid2/etc/mime.conf

logformat squid %tl %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt


logfile_daemon G:/apps/squid2/libexec/logfile-daemon.exe
diskd_program G:/apps/squid2/libexec/diskd-daemon.exe
unlinkd_program G:/apps/squid2/libexec/unlinkd.exe
#pinger_program G:/apps/squid2/libexec/pinger.exe
#cache_dns_program G:/apps/squid2/libexec/dnsserver.exe
icon_directory G:/apps/squid2/share/icons
error_directory G:/apps/squid2/share/errors/English
cache_log G:/apps/squid2/var/logs/cache.log
cache_store_log G:/apps/squid2/var/logs/store.log
access_log G:/apps/squid2/var/logs/access.log squid

首次运行的时候需要手工创建cache目录
mkdir  G:\apps\squid2\var\cache\squid
执行
squid.exe -f  G:/apps/squid2/etc/squid.conf -z
然后执行 squid.exe -f  G:/apps/squid2/etc/squid.conf -i 安装windows服务,安装的时候需要使用管理员命令行窗口,否则无法安装
然后就可以使用net start squid来启动了
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值