You must download a source archive file of the form squid-x.y.z-src.tar.gz (eg, squid-1.1.6-src.tar.gz) from the Squid home page, or. the Squid FTP site. Context diffs are available for upgrading to new versions. These can be applied with the patch program (available from the GNU FTP site).
First you will have to decompress and extract the source archive, by typing:
% gzip -dc squid-x.y.z-src.tar.gz | tar xvf -
Next you will need to configure, compile, and install.
% cd squid-x.y.z
% make all
% make install
Building Squid works best if you have the GNU C (gcc) compiler. Recent versions have been converted to ANSI C, so some older compilers may not work. The GNU C compiler is available at the GNU FTP site.
The configure script can take numerous options. The most
--prefix to install it in a different directory.
The default installation directory is usr/local/squid/. To
change the default, you could do:
% cd squid-x.y.z
% ./configure --prefix=/some/other/directory/squid
The software is designed to operate on any modern Unix system, and is known to work on AIX, FreeBSD, HP-UX, IRIX, Linux, OSF/1, Solaris, and SunOS. If you encounter any platform-specific problems, please let us know by sending email to squid-bugs.
The squid.conf file defines the configuration for squid. the configuration includes (but not limited to) HTTP port number, the ICP request port number, incoming and outgoing requests, information about firewall access, and various timeout information.
Yes, after you
make install, a sample squid.conf file will
exist in the ``etc" directory under the Squid installation directory.
The sample squid.conf file contains comments explaining each option.
After you've finished editing the configuration file, you can start Squid for the first time. The source distribution includes a script called RunCache which makes sure the Squid process is always running.
With version 1.1.16 and later, you must first run Squid with the
-z option to create the cache swap directories.
% /usr/local/squid/bin/squid -z
Squid will exit when it finishes creating all of the directories.
Next you can start RunCache:
% /usr/local/squid/bin/RunCache &
For versions before 1.1.6 you sould just start RunCache immediately, instead of running squid -z first.
You can use the client program:
% client http://www.netscape.com/ > test
There are other command-line HTTP client programs available as well. Two that you may find useful are wget and echoping.
Another way is to use Squid itself to see if it can signal a running
% squid -k check
And then check the shell's exit status variable.
Also, check the log files, most importantly the access.log and cache.log files.
You need the
patch program. You should probably duplicate the
entire directory structure before applying the patch. For example, if
you are upgrading from squid-1.1.10 to 1.1.11, you would run
find . -depth -print | cpio -pdv ../squid-1.1.11
patch < /tmp/diff-1.1.10-1.1.11
After the patch has been applied, you must rebuild Squid from the
very beginning, i.e.:
Note, In later distributions (Squid 1.2), 'realclean' has been changed
patch program seems to complain or refuses to work,
you should get a more recent version, from the
GNU FTP site, for example.