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