Add explanation for send-banner?type=custom in default.filter. See
[privoxy.git] / INSTALL
1 /*********************************************************************
2  *
3  * File        :  $Source: /cvsroot/ijbswa/current/doc/source/install.sgml,v $
4  *
5  * Purpose     :  INSTALL file to help with installing from source.
6  *
7  * Copyright   :  Written by and Copyright (C) 2001,2002 the SourceForge
8  *                Privoxy team. http://www.privoxy.org/
9  *
10  *                Based on the Internet Junkbuster originally written
11  *                by and Copyright (C) 1997 Anonymous Coders and 
12  *                Junkbusters Corporation.  http://www.junkbusters.com
13  *
14  *                This program is free software; you can redistribute it 
15  *                and/or modify it under the terms of the GNU General
16  *                Public License as published by the Free Software
17  *                Foundation; either version 2 of the License, or (at
18  *                your option) any later version.
19  *
20  *                This program is distributed in the hope that it will
21  *                be useful, but WITHOUT ANY WARRANTY; without even the
22  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
23  *                PARTICULAR PURPOSE.  See the GNU General Public
24  *                License for more details.
25  *
26  *                The GNU General Public License should be included with
27  *                this file.  If not, you can view it at
28  *                http://www.gnu.org/copyleft/gpl.html
29  *                or write to the Free Software Foundation, Inc., 59
30  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31  *
32  *********************************************************************/
33    
34
35 -------------------------------------------------------------------------------
36
37 This file describes installing Privoxy from source. If you are installing a
38 pre-built binary installation, you should probably read the appropriate section
39 in User Manual.
40
41 To build Privoxy from source, autoconf, GNU make (gmake), and, of course, a C
42 compiler like gcc are required.
43
44 When building from a source tarball (either release version or nightly CVS
45 tarball), first unpack the source:
46
47  tar xzvf privoxy-3.1.1-beta-src* [.tgz or .tar.gz]                            
48  cd privoxy-3.1.1-beta                                                         
49
50 For retrieving the current CVS sources, you'll need CVS installed. Note that
51 sources from CVS are development quality, and may not be stable, or well
52 tested. To download CVS source:
53
54   cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login          
55   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current 
56   cd current                                                                         
57
58 This will create a directory named current/, which will contain the source
59 tree.
60
61 You can also check out any Privoxy "branch", just exchange the current name
62 with the wanted branch name (Example: v_3_0_branch for the 3.0 cvs tree).
63
64 It is also strongly recommended to not run Privoxy as root, and instead it is
65 suggested to create a "privoxy" user and group for this purpose. See your local
66 documentation for the correct command line to do this.
67
68 /etc/passwd might then look like:
69
70   privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell                         
71
72 And then /etc/group, like:
73
74   privoxy:*:7777:                                                              
75
76 Some binary packages may do this for you.
77
78 Then, to build from either unpacked tarball or CVS source:
79
80  autoheader                                                                    
81  autoconf                                                                      
82  ./configure      # (--help to see options)                                    
83  make             # (the make from GNU, sometimes called gmake)                
84  su                                                                            
85  make -n install  # (to see where all the files will go)                       
86  make -s install  # (to really install, -s to silence output)                  
87
88 If you have GNU make, you can have the first four steps automatically done for
89 you by just typing:
90
91   make                                                                         
92
93 in the freshly downloaded or unpacked source directory.
94
95 WARNING: If installing as root, the install will fail unless a non-root user or
96 group is specified, or a privoxy user and group already exist on the system. If
97 a non-root user is specified, and no group, then the installation will try to
98 also use a group of the same name as "user". If a group is specified (and no
99 user), then the support files will be installed as writable by that group, and
100 owned by the user running the installation.
101
102 configure accepts --with-user and --with-group options for setting user and
103 group ownership of the configuration files (which need to be writable by the
104 daemon). The specified user must already exist. When starting Privoxy, it
105 should be run as this same user to insure write access to configuration and log
106 files.
107
108 Alternately, you can specify user and group on the make command line, but be
109 sure both already exist:
110
111  make -s install  USER=privoxy GROUP=privoxy                                   
112
113 The default installation path for make install is /usr/local. This may of
114 course be customized with the various ./configure path options. If you are
115 doing a root install to anywhere else besides /usr/local, be sure to set the
116 appropriate paths with the correct configure options (./configure --help).
117
118 If you do install to /usr/local, the install will use sysconfdir=$prefix/etc/
119 privoxy by default. All other destinations, and the direct usage of
120 --sysconfdir flag behave like normal, i.e. will not add the extra privoxy
121 directory. This is for a safer install, as there may already exist another
122 program that uses a file with the "config" name, and thus makes /usr/local/etc
123 cleaner.
124
125 If installing to /usr/local, the docs will go by default to $prefix/share/doc.
126 But if this directory doesn't exist, it will then try $prefix/doc and install
127 there before creating a new $prefix/share/doc just for Privoxy.
128
129 Again, if the installs goes to /usr/local, the localstatedir (ie: var/) will
130 default to /var instead of $prefix/var so the logs will go to /var/log/privoxy
131 /, and the pid file will be created in /var/run/privoxy.pid.
132
133 make install will attempt to set the correct values in config (main
134 configuration file). You may want to check this to make sure all values are
135 correct. If appropriate, an init script will be installed, but it is up to the
136 user to determine how and where to start Privoxy. The init script should be
137 checked for correct paths and values, if anything other than a default install
138 is done.
139
140 If install finds previous versions of any configuration files, these will not
141 be overwritten, and the new ones will be installed with a "new" extension. You
142 will then need to manually update the installed configuration files as needed.
143 All template files will be overwritten. If you have customized, local
144 templates, you should save these first. If a previous version of Privoxy is
145 already running, you will have to restart it manually.
146
147 For more detailed instructions on how to build Redhat and SuSE RPMs, Windows
148 self-extracting installers, building on platforms with special requirements
149 etc, please consult the developer manual.
150
151 The simplest command line to start Privoxy is $path/privoxy --user=privoxy
152 $path/etc/privoxy/config. See privoxy --usage, or the man page, for other
153 options, and configuration.
154