]> git.ipfire.org Git - thirdparty/squid.git/blame - QUICKSTART
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / QUICKSTART
CommitLineData
68f0eeed 1
2Squid QUICKSTART
3
262a0e14 4$Id$
68f0eeed 5
951710a0 6This document is intended only for people who want to get Squid running
7quickly It is not a substitute for the real documentation. Squid has
8many features, but only a few of them are useful at the beginning. Use
9this only if you have quite a simple setup.
10
11After you retrieved, compiled and installed the Squid software (see
12INSTALL in the same directory), you have to configure the squid.conf
13file. This is the list of the values you *need* to change, because no
14sensible defaults could be defined. Do not touch the other variables
15for now. We assume you have installed Squid in the default location:
16/usr/local/squid
17
18Uncomment and edit the following lines in /usr/local/squid/etc/squid.conf:
19
20==============================================================================
21
f9989d22 22acl, http_access
951710a0 23
24 Access control lists. This is important because it prevents people
25 from stealing your network resources. To fill in the
f9989d22
AJ
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):
951710a0 28
29 acl manager proto cache_object
f9989d22
AJ
30 acl localhost src 127.0.0.1
31 acl localnet src 192.168.10.0/24
951710a0 32
33 http_access deny manager all
f9989d22 34 http_access allow localnet
951710a0 35 http_access deny all
36
951710a0 37cache_mgr
38
39 Put here the e-mail address of the manager:
40
f9989d22
AJ
41visible_hostname
42
43 The host name you advertise for the cache.
44
951710a0 45cache_effective_user
46
f9989d22
AJ
47 If building your own squid; use ./configure --with-default-user=X
48
951710a0 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
951710a0 53
f9989d22
AJ
54==============================================================================
55
56Some configuration lines which are optional but may be needed.
57
58
59cache_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
68cache_mem 256 MB
69
70 How much memory to allocate for cached files in-memory.
71 The default is shown.
72
73cache_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
951710a0 80
81==============================================================================
82
9c509e7d 83After editing squid.conf to your liking, run Squid from the command
84line TWICE:
951710a0 85
f9989d22 86To create any disk cache_dir configured:
69d8836c 87 % /usr/local/squid/sbin/squid -z
f9989d22
AJ
88
89To start squid:
69d8836c 90 % /usr/local/squid/sbin/squid
951710a0 91
f0320808 92Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
1a8777da 93everything is all right.
951710a0 94
95Once Squid created all its files (it can take several minutes on some
96systems), test it with echoping or a regular Web client. By default,
97your Squid will run on port 3128. See the Squid FAQ for more details.
98
99Once you have Squid working from the command line, tell your Unix to
100start Squid at startup (it depends heavily on the Unix you use, you'll
101typically have to modify something in a /etc/rc_something).
102
103This quick start file written by: Stephane Bortzmeyer and Duane
104Wessels.