]>
Commit | Line | Data |
---|---|---|
68f0eeed | 1 | |
2 | Squid QUICKSTART | |
3 | ||
70c5dfb2 | 4 | $Id: QUICKSTART,v 1.9 2007/12/18 12:15:34 amosjeffries Exp $ |
68f0eeed | 5 | |
951710a0 | 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 | ||
1a8777da | 22 | cache_peer, never_direct/always_direct |
951710a0 | 23 | |
24 | If you have a parent cache, put it here. The administrators of the | |
25 | parent cache typically provided you with instructions. You should | |
1a8777da | 26 | always ask permission before adding a parent cache. See also the |
27 | never_direct/always_direct directives. | |
951710a0 | 28 | |
70c5dfb2 | 29 | cache_dir ufs /usr/local/squid/var/cache 100 16 256 |
951710a0 | 30 | |
9c509e7d | 31 | Add here (first number, here 100) the amount of hard disk space |
fec51b8e | 32 | (in megabytes) to devote to caching. |
951710a0 | 33 | |
1a8777da | 34 | acl, http_access, icp_access |
951710a0 | 35 | |
36 | Access control lists. This is important because it prevents people | |
37 | from stealing your network resources. To fill in the | |
38 | "allowed_hosts" ACL, use your network address (for instance | |
39 | 192.168.10.0 and your network mask (for instance 255.255.255.0): | |
40 | ||
41 | acl manager proto cache_object | |
42 | acl localhost src 127.0.0.1/255.255.255.255 | |
43 | acl all src 0.0.0.0/0.0.0.0 | |
44 | acl allowed_hosts src 192.168.10.0/255.255.255.0 | |
45 | ||
46 | http_access deny manager all | |
47 | http_access allow allowed_hosts | |
48 | http_access deny all | |
49 | ||
50 | icp_access allow allowed_hosts | |
51 | icp_access deny all | |
52 | ||
951710a0 | 53 | cache_mgr |
54 | ||
55 | Put here the e-mail address of the manager: | |
56 | ||
57 | cache_effective_user | |
58 | ||
59 | If you must start Squid as root, find a safe user and group to run | |
60 | as after startup (typically "nobody" and "nogroup"). Do not use | |
61 | "root", for security reasons. | |
62 | ||
63 | visible_hostname | |
64 | ||
65 | The host name you advertise for the cache. | |
66 | ||
67 | ============================================================================== | |
68 | ||
9c509e7d | 69 | After editing squid.conf to your liking, run Squid from the command |
70 | line TWICE: | |
951710a0 | 71 | |
69d8836c | 72 | % /usr/local/squid/sbin/squid -z |
73 | % /usr/local/squid/sbin/squid | |
951710a0 | 74 | |
f0320808 | 75 | Check in the cache.log (/usr/local/squid/var/logs/cache.log) that |
1a8777da | 76 | everything is all right. |
951710a0 | 77 | |
78 | Once Squid created all its files (it can take several minutes on some | |
79 | systems), test it with echoping or a regular Web client. By default, | |
80 | your Squid will run on port 3128. See the Squid FAQ for more details. | |
81 | ||
82 | Once you have Squid working from the command line, tell your Unix to | |
83 | start Squid at startup (it depends heavily on the Unix you use, you'll | |
84 | typically have to modify something in a /etc/rc_something). | |
85 | ||
86 | This quick start file written by: Stephane Bortzmeyer and Duane | |
87 | Wessels. |