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