]>
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 | |
23 | from stealing your network resources. To fill in the | |
f9989d22 AJ |
24 | "localnet" ACL, use your network address (for instance 192.168.10.0 |
25 | your CIDR network mask (for instance 255.255.255.0 or /24): | |
951710a0 | 26 | |
27 | acl manager proto cache_object | |
f9989d22 AJ |
28 | acl localhost src 127.0.0.1 |
29 | acl localnet src 192.168.10.0/24 | |
951710a0 | 30 | |
31 | http_access deny manager all | |
f9989d22 | 32 | http_access allow localnet |
951710a0 | 33 | http_access deny all |
34 | ||
951710a0 | 35 | cache_mgr |
36 | ||
37 | Put here the e-mail address of the manager: | |
38 | ||
f9989d22 AJ |
39 | visible_hostname |
40 | ||
41 | The host name you advertise for the cache. | |
42 | ||
951710a0 | 43 | cache_effective_user |
44 | ||
f9989d22 AJ |
45 | If building your own squid; use ./configure --with-default-user=X |
46 | ||
951710a0 | 47 | If you must start Squid as root, find a safe user and group to run |
48 | as after startup (typically "nobody" and "nogroup"). Do not use | |
49 | "root", for security reasons. | |
50 | ||
951710a0 | 51 | |
f9989d22 AJ |
52 | ============================================================================== |
53 | ||
54 | Some configuration lines which are optional but may be needed. | |
55 | ||
56 | ||
57 | cache_dir ufs /usr/local/squid/var/cache 100 16 256 | |
58 | ||
59 | Add here (first number, here 100) the amount of hard disk space | |
60 | (in megabytes) to devote to caching. | |
61 | The default is to store files in 256 MB of memory instead of disk | |
62 | ||
63 | Linux : use aufs instead of ufs | |
64 | BSD : use diskd instead of ufs | |
65 | ||
66 | cache_mem 256 MB | |
67 | ||
68 | How much memory to allocate for cached files in-memory. | |
69 | The default is shown. | |
70 | ||
71 | cache_peer, never_direct/always_direct | |
72 | ||
73 | If you have a parent cache, put it here. The administrators of the | |
74 | parent cache typically provided you with instructions. You should | |
75 | always ask permission before adding a parent cache. See also the | |
76 | never_direct/always_direct directives. | |
77 | ||
951710a0 | 78 | |
79 | ============================================================================== | |
80 | ||
9c509e7d | 81 | After editing squid.conf to your liking, run Squid from the command |
82 | line TWICE: | |
951710a0 | 83 | |
f9989d22 | 84 | To create any disk cache_dir configured: |
69d8836c | 85 | % /usr/local/squid/sbin/squid -z |
f9989d22 AJ |
86 | |
87 | To start squid: | |
69d8836c | 88 | % /usr/local/squid/sbin/squid |
951710a0 | 89 | |
f0320808 | 90 | Check in the cache.log (/usr/local/squid/var/logs/cache.log) that |
1a8777da | 91 | everything is all right. |
951710a0 | 92 | |
93 | Once Squid created all its files (it can take several minutes on some | |
94 | systems), test it with echoping or a regular Web client. By default, | |
95 | your Squid will run on port 3128. See the Squid FAQ for more details. | |
96 | ||
97 | Once you have Squid working from the command line, tell your Unix to | |
98 | start Squid at startup (it depends heavily on the Unix you use, you'll | |
99 | typically have to modify something in a /etc/rc_something). | |
100 | ||
101 | This quick start file written by: Stephane Bortzmeyer and Duane | |
102 | Wessels. |