]>
Commit | Line | Data |
---|---|---|
68f0eeed | 1 | |
2 | Squid QUICKSTART | |
3 | ||
951710a0 | 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 | ||
f9989d22 | 20 | acl, 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 | 33 | cache_mgr |
34 | ||
302e5322 SM |
35 | Put here the e-mail address of the manager. |
36 | ||
37 | ============================================================================== | |
38 | ||
39 | Some configuration lines which are optional but may be needed. | |
951710a0 | 40 | |
f9989d22 AJ |
41 | visible_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 | 47 | cache_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 |
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 | ||
951710a0 | 76 | |
77 | ============================================================================== | |
78 | ||
9c509e7d | 79 | After editing squid.conf to your liking, run Squid from the command |
80 | line TWICE: | |
951710a0 | 81 | |
f9989d22 | 82 | To create any disk cache_dir configured: |
69d8836c | 83 | % /usr/local/squid/sbin/squid -z |
f9989d22 AJ |
84 | |
85 | To start squid: | |
69d8836c | 86 | % /usr/local/squid/sbin/squid |
951710a0 | 87 | |
f0320808 | 88 | Check in the cache.log (/usr/local/squid/var/logs/cache.log) that |
1a8777da | 89 | everything is all right. |
951710a0 | 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 | ||
302e5322 SM |
99 | ============================================================================== |
100 | ||
101 | /* | |
77b1029d | 102 | * Copyright (C) 1996-2020 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 | ||
109 | This quick start file written by: | |
110 | Stephane Bortzmeyer and Duane Wessels. |