Set paths to match the defaults for a root install. Force remove PIDFILE on
[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:privoxy                                                       
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 install     # (to really install)                                        
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.
98
99 The default installation path for make install is /usr/local. This may of
100 course be customized with the various ./configure path options.
101
102 If you do install to /usr/local, the install will use sysconfdir=$prefix/etc/
103 privoxy by default. All other destinations, and the direct usage of
104 --sysconfdir flag behave like normal, i.e. will not add the extra privoxy
105 directory. This is for a safer install, as there may already exist another
106 program that uses a file with the "config" name, and thus makes /usr/local/etc
107 cleaner.
108
109 If installing to /usr/local, the docs will go by default to $prefix/share/doc.
110 But if this directory doesn't exist, it will then try $prefix/doc and install
111 there before creating a new $prefix/share/doc just for Privoxy.
112
113 Again, if the installs goes to /usr/local, the localstatedir (ie: var/) will
114 default to /var instead of $prefix/var so the logs will go to /var/log/privoxy
115 /, and the pid file will be created in /var/run/privoxy.pid.
116
117 make install will attempt to set the correct values in config (main
118 configuration file). You may want to check this to make sure all values are
119 correct. If appropriate, an init script will be installed, but it is up to the
120 user to determine how and where to start Privoxy.
121
122 For more detailed instructions on how to build Redhat and SuSE RPMs, Windows
123 self-extracting installers, building on platforms with special requirements
124 etc, please consult the developer manual.
125
126 For binary RPM installation, and other platforms, see the User Manual as well.
127
128 The simplest command line to start Privoxy is $path/privoxy --user=privoxy
129 $path/etc/privoxy/config. See privoxy --usage, or the man page, for other
130 options, and configuration.
131