Вы находитесь на странице: 1из 7

Installing Squid on Windows XP PC Eleven Step Process ( Read carefully 1. Download File squid-2.7.STABLE8-bin.zip from http://squid.acmeconsulting.

Standard 2.7.STABLE8 13/03/2010

2. Copy this file in say e:\ drive 3. Right click and Extract it directly using winrar (say Extract Here)

4. G

o to Folder E:\squid\etc and then rename the following files:

o o o o

squid.conf.default ==> squid.conf mime.conf.default ==> mime.conf cachemgr.conf.default ==> cachemgr.conf squid_radius_auth.conf .default ==> squid_radius_auth.conf

5. Edit the squid.conf and change if needed the c:/squid path (use path with '/' char, NOT '\') Manually create ALL the directories specified in squid.conf, except the contents of the cache directory Open e:\squid\etc\squid.conf Verify line 2107 access_log c:/squid/var/logs/access.log squid 6. Open command prompt go to directory c:\squid\sbin and issue command squid -i [-f e:/squid/etc/squid.conf] [-n Squid] Help as below:{squid -i [-f configfile] [-n servicename] (installs the servicename Squid service using the configfile configuration file, default configfile is "c:/squid/etc/squid.conf", default servicename is "Squid" } note:- case sensitive and quotes and / instead of \ 7. Now on command prompt issue command (be in directory e:\squid\sbin) squid z [-f e:/squid/etc/squid.conf] Help as below :{squid -z [-f configfile] (creates the cache directories) } 8. On command prompt issue command

Squid -O servicecommandline [-n Squid] Help as below :squid -O servicecommandline [-n servicename] (Set in Windows Registry the Squid servicename service command line) (Instead of Above step 8 , Step 9 , Step 10 Issue the command on prompt c:\squid\sbin Squid.bat Note* this command is prepared Including all three commands.

9. Go to control panel Services and Start service Squid

======================== Done=============================================

Uninstall: Squid r [-n Squid] Help as Below:

squid -r [-n servicename] (removes the servicename Squid service)

Usage: Service mode:

Start: Control Panel/Services: choose "Start" for the "Squid" service. Stop: Control Panel/Services: choose "Stop" for the "Squid" service. squid -h Print help message. squid -n servicename [-f configfile] -k reconfigure | rotate | shutdown | interrupt | kill | debug | check Send signal to running copy and exit. squid -O servicecommandline [-n servicename] Set Windows Service Command line options in Registry. squid -v Print version. The rest of the (original) cmdline switches when running as a Service must be used once with the -O switch. If multiple service command line options must be specified, use quote. Don't use the "Start parameters" in the Windows Service applet: they are specific to Windows services functionality and Squid is not designed for understand they. Example:
squid -O "-D -u 3130" -n squidsvc

Don't forget to take a look on Squid documentation on www.squid-cache.org This Squid build can support multiple Squid service instances running from the same executable, so the service name MUST be ALWAYS specified when using all -k, -O commands even running only one instance. Every instance must have a different service name, use different TCP ports, use different logs and cache directory and use a different configuration file. So, when installing the service, if don't using the default settings (c:/squid,Squid Service Name), the service name and the associated config file MUST be specified. The same when removing or running squid -k or -O commands. Command Line mode:

All Squid cmdline switches are available, except the -N (no daemon mode)

Compiling source code:

Microsoft build environment:

Microsoft Visual C++ 6.0 Service Pack 6 Microsoft latest Core SDK Native CVS, gawk, perl, sed and patch for NT MinGW environment: o MSYS 1.0.9 or later o MinGW 3.1.0 or later o Windows API 2.4.0 or later o MSYS Developer Tool Kit 1.0.1 or later Build environments configuration How obtain the sources: o Download the auto-generated daily tar.gz archive from Squid download Page or o Get with CVS the nt branch from devel.squid-cache.org Build using Microsoft Visual Studio: o Check ASCII format of all project files, must be DOS (CR+LF) o Check paths on all project files o Verify the Squid options defined in autoconf.h o Check default parameters on squid_mswin.mak file o Check settings on Install files project Build using MinGW: o From MSYS prompt run:
o o o ./configure --prefix=c:/squid --disable-wccp --disable-wccpv2 \ --enable-win32-service --enable-default-hostsfile=none make o

For other configure options see Squid FAQ

Compatibility Notes:

It's recommended to use / char in Squid paths instead of \ Paths with spaces (like C:\Programs Files\Squid) are NOT supported by Squid Include wildcard patterns in squid.conf are NOT supported on Windows When using ACL like acl aclname acltype "file" the file must be in DOS text format (CR+LF) and the full Windows path must be specified, for example:
acl blocklist url_regex -i "c:/squid/etc/blocked1.txt"

The Windows equivalent of /dev/null is NUL Squid doesn't know how to run external helpers based on scripts, like .bat, .cmd, .vbs, .pl, etc. So in squid.conf the interpreter path must be always specified, for example:
redirect_program c:/perl/bin/perl.exe c:/squid/libexec/redir.pl redirect_program c:/winnt/system32/cmd.exe /C c:/squid/libexec/redir.cmd

When Squid runs in command line mode, the launching user account must have administrative privilege on the system "Start parameters" in the Windows 2000/XP/2003 Service applet cannot be used

Known Limitations:

Squid features not operational: DISKD: needs to be ported - Volunteers are welcome WCCP: cannot work because GRE support on Windows is missing - Volunteers are welcome Transparent Proxy: missing Windows non commercial interception driver Some code sections can make blocking calls Some external helpers may not work File Descriptors number hard-limited to 2048

For general Squid configuration ask always on squid-users mailing list. Commercial support is available from Acme Consulting S.r.l.. Squid for Windows Commercial Support Request (ask for price) Squid for Windows BUG Reports Original Port and some enhancements by Romeo Anghelache (see the ChangeLog)

Line 1104 http_port 3128 line 2107 access_log c:/squid/var/logs/access.log squid change to access_log e:/squid/var/logs/access.log squid