]> git.ipfire.org Git - thirdparty/squid.git/blob - QUICKSTART
Convert hostname_aliases to SBufList (#1737)
[thirdparty/squid.git] / QUICKSTART
1
2 Squid QUICKSTART
3
4 This document is intended only for people who want to get Squid running
5 quickly It is not a substitute for the real documentation. Squid has
6 many features, but only a few of them are useful at the beginning. Use
7 this only if you have quite a simple setup.
8
9 After you retrieved, compiled and installed the Squid software (see
10 INSTALL in the same directory), you have to configure the squid.conf
11 file. This is the list of the values you *need* to change, because no
12 sensible defaults could be defined. Do not touch the other variables
13 for now. We assume you have installed Squid in the default location:
14 /usr/local/squid
15
16 Uncomment and edit the following lines in /usr/local/squid/etc/squid.conf:
17
18 ==============================================================================
19
20 acl, http_access
21
22 Access control lists. This is important because it prevents people
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:
27
28 acl localnet src 192.168.10.0/24
29
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.
32
33 cache_mgr
34
35 Put here the e-mail address of the manager.
36
37 ==============================================================================
38
39 Some configuration lines which are optional but may be needed.
40
41 visible_hostname
42
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.
46
47 cache_effective_user
48
49 If building your own squid; use ./configure --with-default-user=X
50
51 You must start Squid as root, with a safe user and group to run
52 as after startup (typically "nobody" and "nogroup"). Do not use
53 "root", for security reasons.
54
55 cache_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
64 cache_mem 256 MB
65
66 How much memory to allocate for cached files in-memory.
67 The default is shown.
68
69 cache_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
76
77 ==============================================================================
78
79 After editing squid.conf to your liking, run Squid from the command
80 line TWICE:
81
82 To create any disk cache_dir configured:
83 % /usr/local/squid/sbin/squid -z
84
85 To start squid:
86 % /usr/local/squid/sbin/squid
87
88 Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
89 everything is all right.
90
91 Once Squid created all its files (it can take several minutes on some
92 systems), test it with echoping or a regular Web client. By default,
93 your Squid will run on port 3128. See the Squid FAQ for more details.
94
95 Once you have Squid working from the command line, tell your Unix to
96 start Squid at startup (it depends heavily on the Unix you use, you'll
97 typically have to modify something in a /etc/rc_something).
98
99 ==============================================================================
100
101 /*
102 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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
109 This quick start file written by:
110 Stephane Bortzmeyer and Duane Wessels.