]> git.ipfire.org Git - thirdparty/squid.git/blob - QUICKSTART
Merged from trunk.
[thirdparty/squid.git] / QUICKSTART
1
2 Squid QUICKSTART
3
4 $Id: QUICKSTART,v 1.9 2007/12/18 12:15:34 amosjeffries Exp $
5
6 This document is intended only for people who want to get Squid running
7 quickly It is not a substitute for the real documentation. Squid has
8 many features, but only a few of them are useful at the beginning. Use
9 this only if you have quite a simple setup.
10
11 After you retrieved, compiled and installed the Squid software (see
12 INSTALL in the same directory), you have to configure the squid.conf
13 file. This is the list of the values you *need* to change, because no
14 sensible defaults could be defined. Do not touch the other variables
15 for now. We assume you have installed Squid in the default location:
16 /usr/local/squid
17
18 Uncomment and edit the following lines in /usr/local/squid/etc/squid.conf:
19
20 ==============================================================================
21
22 acl, http_access
23
24 Access control lists. This is important because it prevents people
25 from stealing your network resources. To fill in the
26 "localnet" ACL, use your network address (for instance 192.168.10.0
27 your CIDR network mask (for instance 255.255.255.0 or /24):
28
29 acl manager proto cache_object
30 acl localhost src 127.0.0.1
31 acl localnet src 192.168.10.0/24
32
33 http_access deny manager all
34 http_access allow localnet
35 http_access deny all
36
37 cache_mgr
38
39 Put here the e-mail address of the manager:
40
41 visible_hostname
42
43 The host name you advertise for the cache.
44
45 cache_effective_user
46
47 If building your own squid; use ./configure --with-default-user=X
48
49 If you must start Squid as root, find a safe user and group to run
50 as after startup (typically "nobody" and "nogroup"). Do not use
51 "root", for security reasons.
52
53
54 ==============================================================================
55
56 Some configuration lines which are optional but may be needed.
57
58
59 cache_dir ufs /usr/local/squid/var/cache 100 16 256
60
61 Add here (first number, here 100) the amount of hard disk space
62 (in megabytes) to devote to caching.
63 The default is to store files in 256 MB of memory instead of disk
64
65 Linux : use aufs instead of ufs
66 BSD : use diskd instead of ufs
67
68 cache_mem 256 MB
69
70 How much memory to allocate for cached files in-memory.
71 The default is shown.
72
73 cache_peer, never_direct/always_direct
74
75 If you have a parent cache, put it here. The administrators of the
76 parent cache typically provided you with instructions. You should
77 always ask permission before adding a parent cache. See also the
78 never_direct/always_direct directives.
79
80
81 ==============================================================================
82
83 After editing squid.conf to your liking, run Squid from the command
84 line TWICE:
85
86 To create any disk cache_dir configured:
87 % /usr/local/squid/sbin/squid -z
88
89 To start squid:
90 % /usr/local/squid/sbin/squid
91
92 Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
93 everything is all right.
94
95 Once Squid created all its files (it can take several minutes on some
96 systems), test it with echoping or a regular Web client. By default,
97 your Squid will run on port 3128. See the Squid FAQ for more details.
98
99 Once you have Squid working from the command line, tell your Unix to
100 start Squid at startup (it depends heavily on the Unix you use, you'll
101 typically have to modify something in a /etc/rc_something).
102
103 This quick start file written by: Stephane Bortzmeyer and Duane
104 Wessels.