To get started running the Squid caching proxy server, begin with the
QUICKSTART file. QUICKSTART
should be in /usr/doc/squid-2.2/, if you installed
the squid package, or in
/usr/doc/squid-novm-2.2/ if you installed
squid-novm. For more complete information, you
should open the FAQ.php3 file (in the same
directory as the QUICKSTART file) using your Web
browser. You should also rely on the information provided at the Squid
Web site at http://squid.nlanr.net/.
You can have Squid start and stop automatically as your machine boots
and shuts down by adding symlinks to your system's
/etc/rc.d/rc3.d and
/etc/rc.d/rc0.d directories. The following
commands will create the symlinks:
cd /etc/rc.d/rc3.d
ln -s ../init.d/squid S99squid
cd /etc/rc.d/rc0.d
ln -s ../init.d/squid K99squid
|
If you are using the X Window System, you can create the symlinks with
tksysv.
To run Squid, you'll need to edit some parameters in its configuration
file, /etc/squid.conf, as follows:
Find the line that begins with:
Uncomment this line and replace 8 with the amount
of RAM (in megabytes) that you want to allocate to Squid.
Find the line that begins with:
Uncomment this line and replace 100 with the
amount of disk space (in megabytes) you want to allocate to Squid.
Find the following section:
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl all src 0.0.0.0/0.0.0.0
|
Add the following line to the end of the previous section:
acl allowed_hosts src XXX.XXX.XXX.0/255.255.255.0
|
Replace the Xs (before the /) with your domain
subnet. Replace the 255.255.255.0 with your
domain's subnet mask.
Find the following section:
Replace it with:
http_access allow allowed_hosts
http_access deny all
|
Find the following section:
Replace it with:
icp_access allow allowed_hosts
icp_access deny all
|
Find the following line:
Uncomment this line and replace webmaster with
the e-mail address of the Squid adminstrator.
Save the squid.conf file.
You can now start Squid by invoking the squid
start command in /etc/rc.d/init.d/:
/etc/rc.d/init.d/squid start
|
If this is the first time you've run Squid, it will create the swap
directories it needs upon startup.
Squid should now be listening to port 3128 on your Web server. You can
now set up Netscape (from any machine you chose to allow access to
Squid) to use your machine as its proxy server. Some people configure
their routers to forward any requests on port 80 to redirect through
Squid; this saves them from having to set up the proxy on all the
machines on their network.