File: QUICKSTART

package info (click to toggle)
squid 1.1.21-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,828 kB
  • ctags: 3,705
  • sloc: ansic: 34,400; sh: 1,975; perl: 899; makefile: 559
file content (94 lines) | stat: -rw-r--r-- 3,271 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
This document is intended only for people who want to get Squid running
quickly It is not a substitute for the real documentation.  Squid has
many features, but only a few of them are useful at the beginning.  Use
this only if you have quite a simple setup.

After you retrieved, compiled and installed the Squid software (see
INSTALL in the same directory), you have to configure the squid.conf
file. This is the list of the values you *need* to change, because no
sensible defaults could be defined. Do not touch the other variables
for now.  We assume you have installed Squid in the default location:
/usr/local/squid

Uncomment and edit the following lines in /usr/local/squid/etc/squid.conf:

==============================================================================

cache_host

    If you have a parent cache, put it here.  The administrators of the
    parent cache typically provided you with instructions.  You should
    always ask permission before adding a parent cache.

cache_mem

    Add here the amount of memory (RAM memory) to devote to caching.
    Warning: Squid uses much more than this value.  Rule of thumb: if
    you have N megabytes free for Squid, put N/3 here.

cache_swap

    Add here the amount of hard disk space (in megabytes) to devote to 
    caching:

acl, http_access, icp_access

    Access control lists.  This is important because it prevents people
    from stealing your network resources.  To fill in the
    "allowed_hosts" ACL, use your network address (for instance
    192.168.10.0 and your network mask (for instance 255.255.255.0):

        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
        acl allowed_hosts src 192.168.10.0/255.255.255.0

        http_access deny manager all
        http_access allow allowed_hosts
        http_access deny all

        icp_access  allow  allowed_hosts
        icp_access deny all


cache_mgr

    Put here the e-mail address of the manager:

cache_effective_user

    If you must start Squid as root, find a safe user and group to run
    as after startup (typically "nobody" and "nogroup").  Do not use
    "root", for security reasons.

visible_hostname

    The host name you advertise for the cache.

==============================================================================

After editing squid.conf to your liking, run Squid with the -z option
to create the swap directories:

    % cd /usr/local/squid
    % bin/squid -z

This procedure may take a few minutes.  Watch your screen and check
logs/cache.log to make sure the directories were created successfully.

After the directories have been created, run Squid from the command line
to make sure its working.

    % bin/squid

You should NOT get the shell prompt back; squid does not go into the
background by default.   You can test squid with echoping or a regular
Web browser. By default, your Squid will run on port 3128. See the
Squid FAQ for more details.

Once you have Squid working from the command line, tell your Unix to
start Squid at startup (it depends heavily on the Unix you use, you'll
typically have to modify something in a /etc/rc_something).

This quick start file written by: Stephane Bortzmeyer and Duane
Wessels.