Quote $$answer to avoid error on null value.
[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 To build Privoxy from source, autoconf, GNU make (gmake), and, of course, a C
38 compiler like gcc are required.
39
40 When building from a source tarball (either release version or nightly CVS
41 tarball), first unpack the source:
42
43  tar xzvf privoxy-3.1.1-beta-src* [.tgz or .tar.gz]                            
44  cd privoxy-3.1.1-beta                                                         
45
46 For retrieving the current CVS sources, you'll need CVS installed. Note that
47 sources from CVS are development quality, and may not be stable, or well
48 tested. To download CVS source:
49
50   cvs -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa login          
51   cvs -z3 -d:pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa co current 
52   cd current                                                                         
53
54 This will create a directory named current/, which will contain the source
55 tree.
56
57 You can also check out any Privoxy "branch", just exchange the current name
58 with the wanted branch name (Example: v_3_0_branch for the 3.0 cvs tree).
59
60 It is also strongly recommended to not run Privoxy as root, and instead it is
61 suggested to create a "privoxy" user and group for this purpose. See your local
62 documentation for the correct command line to do this.
63
64 /etc/passwd might then look like:
65
66   privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell                         
67
68 And then /etc/group, like:
69
70   privoxy:*:7777:                                                              
71
72 Some binary packages may do this for you.
73
74 Then, to build from either unpacked tarball or CVS source:
75
76  autoheader                                                                    
77  autoconf                                                                      
78  ./configure      # (--help to see options)                                    
79  make             # (the make from gnu, gmake for *BSD)                        
80  su                                                                            
81  make -n install  # (to see where all the files will go)                       
82  make -s install  # (to really install, -s to silence output)                  
83
84 If you have GNU make, you can have the first four steps automatically done for
85 you by just typing:
86
87   make                                                                         
88
89 in the freshly downloaded or unpacked source directory.
90
91 WARNING: If installing as root, the install will fail unless another user is
92 specified. configure accepts --with-user and --with-group options for setting
93 user and group ownership of the configuration files (which need to be writable
94 by the daemon). The specified user must already exist. Or if there is already a
95 privoxy user on the system, and no user was specified during configure, make
96 install then will use the privoxy user. When starting Privoxy, it should be run
97 as this same user that owns the configuration and log files.
98
99 Alternately, you can specify user and group on the make command line, but be
100 sure both already exist:
101
102  make -s install  USER=privoxy GROUP=privoxy                                   
103
104 If no group is specified, the install will assume a group exists with the same
105 name as the specified user.
106
107 The default installation path for make install is /usr/local. This may of
108 course be customized with the various ./configure path options. If you are
109 doing a root install to anywhere else besides /usr/local, be sure to set the
110 appropriate paths with the correct configure options (./configure --help).
111
112 If you do install to /usr/local, the install will use sysconfdir=$prefix/etc/
113 privoxy by default. All other destinations, and the direct usage of
114 --sysconfdir flag behave like normal, i.e. will not add the extra privoxy
115 directory. This is for a safer install, as there may already exist another
116 program that uses a file with the "config" name, and thus makes /usr/local/etc
117 cleaner.
118
119 If installing to /usr/local, the docs will go by default to $prefix/share/doc.
120 But if this directory doesn't exist, it will then try $prefix/doc and install
121 there before creating a new $prefix/share/doc just for Privoxy.
122
123 Again, if the installs goes to /usr/local, the localstatedir (ie: var/) will
124 default to /var instead of $prefix/var so the logs will go to /var/log/privoxy
125 /, and the pid file will be created in /var/run/privoxy.pid.
126
127 make install will attempt to set the correct values in config (main
128 configuration file). You may want to check this to make sure all values are
129 correct. If appropriate, an init script will be installed, but it is up to the
130 user to determine how and where to start Privoxy. The init script should be
131 checked for correct paths and values, if anything other than a default install
132 is done.
133
134 If install finds previous versions of any configuration files, these will not
135 be overwritten, and the new ones will be installed with a "new" extension. You
136 will then need to manually update the installed configuration files as needed.
137 All template files will be overwritten. If you have customized, local
138 templates, you should save these first. If a previous version of Privoxy is
139 already running, you will have to restart it manually.
140
141 For more detailed instructions on how to build Redhat and SuSE RPMs, Windows
142 self-extracting installers, building on platforms with special requirements
143 etc, please consult the developer manual.
144
145 For binary RPM installation, and other platforms, see the User Manual as well.
146
147 The simplest command line to start Privoxy is $path/privoxy --user=privoxy
148 $path/etc/privoxy/config. See privoxy --usage, or the man page, for other
149 options, and configuration.
150