Previous Next Table of Contents

2. Installation

2.1 Which file do I download to get Squid?

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).

2.2 How do I install Squid?

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 % ./configure % 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 useful is --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

2.3 What Operating Systems does Squid support?

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.

2.4 What does the squid.conf file do?

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.

2.5 Do you have a squid.conf example?

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.

2.6 How do I start Squid?

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.

2.7 How do I tell if Squid is running?

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 process: % 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.

2.8 How do I apply a patch or a diff?

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 these commands: cd squid-1.1.10 mkdir ../squid-1.1.11 find . -depth -print | cpio -pdv ../squid-1.1.11 cd ../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.: make realclean ./configure make make install Note, In later distributions (Squid 1.2), 'realclean' has been changed to 'distclean'.

If your patch program seems to complain or refuses to work, you should get a more recent version, from the GNU FTP site, for example.


Previous Next Table of Contents