Squid_ The Definitive Guide - Duane Wessels [25]
To rerun ./configure with the same options, use this command:
% ./config.status --recheck
Another technique is to "touch" the config.status file, which updates its timestamp. This causes make to re-run the ./configure script before compiling the source code:
% touch config.status
% make
To add or remove ./configure options, you need to type in the whole command again. If you can't remember the previous options, just look at the top of the config.status file. For example:
% head config.status
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host foo.life-gone-hazy.com:
#
# ./configure --enable-storeio=ufs,diskd --enable-carp \
# --enable-auth-modules=NCSA
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
After rerunning ./configure, you must compile and install Squid again. To be safe, it's a good idea to run make clean first:
% make clean
% make
Recall that ./configure caches the things it discovers about your system. In some situations, you'll want to clear this cache and start the compilation process from the very beginning. You can simply remove the config.cache file if you like. Then, the next time ./configure runs, it won't use the previous values. You can also restore the Squid source tree to its preconfigure state with the following command:
% make distclean
This removes all object files and other files created by the ./configure and make commands.
Exercises
After compiling Squid, remove one or more of the .o files and run make again.
Use the ulimit or limits command to change the file descriptor limit to some small value before compiling Squid. Does ./configure obey or ignore your new limit?
Compile Squid with a high file-descriptor limit, then try to run it on a system with a lower limit. Does Squid use the lower or higher limit?
What happens if you mistype one of the —enable options? What if you specify an invalid storage scheme with the —enable-store-io option?
After compiling Squid, remove src/Makefile and try to compile it again. What's the easiest way to restore the file?
Chapter 4. Configuration Guide for the Eager
After compiling and installing Squid, your next task is to delve into the configuration file. If you're new to Squid, you're likely to find it a bit overwhelming. The most recent version has approximately 200 configuration file directives and 2700 lines of comments. I certainly don't expect you to read about, and configure, every directive before starting Squid. This chapter can help you get Squid running quickly.
All the squid.conf directives have default values. You might be able to get Squid going without even touching the configuration file. However, I don't recommend trying that. You'll be much happier if you read the following sections first.
If you are really turned off by Squid's configuration file syntax, you might want to try the Webmin graphical user interface. It allows you to configure Squid (and numerous other programs) from your web browser. See http://www.webmin.com and The Book of Webmin by Joe Cooper (No Starch Press) for more information.
The squid.conf Syntax
Squid's configuration file is relatively straightforward. It is similar in style to many other Unix programs. Each line begins with a configuration directive, followed by some number of values and/or keywords. Squid ignores empty lines and comment lines (beginning with #) when reading the configuration file. Here are some sample configuration lines:
cache_log /squid/var/cache.log
# define the localhost ACL
acl Localhost src 127.0.0.1/32
connect_timeout 2 minutes
log_fqdn on
Some directives take a single value. For these, repeating the directive with a different value overwrites the previous value. For example, there is only one connect_timeout value. The first line in the following example has no effect because the second line