rebuild docs
[privoxy.git] / doc / webserver / user-manual / installation.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Installation</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9 REL="HOME"
10 TITLE="Privoxy 3.0.27 User Manual"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="Introduction"
14 HREF="introduction.html"><LINK
15 REL="NEXT"
16 TITLE="What's New in this Release"
17 HREF="whatsnew.html"><LINK
18 REL="STYLESHEET"
19 TYPE="text/css"
20 HREF="../p_doc.css"><META
21 HTTP-EQUIV="Content-Type"
22 CONTENT="text/html;
23 charset=ISO-8859-1">
24 <LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
25 </head
26 ><BODY
27 CLASS="SECT1"
28 BGCOLOR="#EEEEEE"
29 TEXT="#000000"
30 LINK="#0000FF"
31 VLINK="#840084"
32 ALINK="#0000FF"
33 ><DIV
34 CLASS="NAVHEADER"
35 ><TABLE
36 SUMMARY="Header navigation table"
37 WIDTH="100%"
38 BORDER="0"
39 CELLPADDING="0"
40 CELLSPACING="0"
41 ><TR
42 ><TH
43 COLSPAN="3"
44 ALIGN="center"
45 >Privoxy 3.0.27 User Manual</TH
46 ></TR
47 ><TR
48 ><TD
49 WIDTH="10%"
50 ALIGN="left"
51 VALIGN="bottom"
52 ><A
53 HREF="introduction.html"
54 ACCESSKEY="P"
55 >Prev</A
56 ></TD
57 ><TD
58 WIDTH="80%"
59 ALIGN="center"
60 VALIGN="bottom"
61 ></TD
62 ><TD
63 WIDTH="10%"
64 ALIGN="right"
65 VALIGN="bottom"
66 ><A
67 HREF="whatsnew.html"
68 ACCESSKEY="N"
69 >Next</A
70 ></TD
71 ></TR
72 ></TABLE
73 ><HR
74 ALIGN="LEFT"
75 WIDTH="100%"></DIV
76 ><DIV
77 CLASS="SECT1"
78 ><H1
79 CLASS="SECT1"
80 ><A
81 NAME="INSTALLATION"
82 >2. Installation</A
83 ></H1
84 ><P
85 > <SPAN
86 CLASS="APPLICATION"
87 >Privoxy</SPAN
88 > is available both in convenient pre-compiled
89  packages for a wide range of operating systems, and as raw source code.
90  For most users, we recommend using the packages, which can be downloaded from our
91  <A
92 HREF="https://sourceforge.net/projects/ijbswa/"
93 TARGET="_top"
94 >Privoxy Project
95  Page</A
96 >.</P
97 ><P
98 > Note:
99  On some platforms, the installer may remove previously installed versions, if
100  found. (See below for your platform). In any case <SPAN
101 CLASS="emphasis"
102 ><I
103 CLASS="EMPHASIS"
104 >be sure to backup
105  your old configuration if it is valuable to you.</I
106 ></SPAN
107 > See the <A
108 HREF="whatsnew.html#UPGRADERSNOTE"
109 >note to upgraders</A
110 > section below.</P
111 ><DIV
112 CLASS="SECT2"
113 ><H2
114 CLASS="SECT2"
115 ><A
116 NAME="INSTALLATION-PACKAGES"
117 >2.1. Binary Packages</A
118 ></H2
119 ><P
120 >How to install the binary packages depends on your operating system:</P
121 ><DIV
122 CLASS="SECT3"
123 ><H3
124 CLASS="SECT3"
125 ><A
126 NAME="INSTALLATION-DEB"
127 >2.1.1. Debian and Ubuntu</A
128 ></H3
129 ><P
130 > DEBs can be installed with <TT
131 CLASS="LITERAL"
132 >apt-get install privoxy</TT
133 >,
134  and will use <TT
135 CLASS="FILENAME"
136 >/etc/privoxy</TT
137 > for the location of
138  configuration files.</P
139 ></DIV
140 ><DIV
141 CLASS="SECT3"
142 ><H3
143 CLASS="SECT3"
144 ><A
145 NAME="INSTALLATION-PACK-WIN"
146 >2.1.2. Windows</A
147 ></H3
148 ><P
149 > Just double-click the installer, which will guide you through
150  the installation process. You will find the configuration files
151  in the same directory as you installed <SPAN
152 CLASS="APPLICATION"
153 >Privoxy</SPAN
154 > in.</P
155 ><P
156 > Version 3.0.5 beta introduced full <SPAN
157 CLASS="APPLICATION"
158 >Windows</SPAN
159 > service
160  functionality. On Windows only, the <SPAN
161 CLASS="APPLICATION"
162 >Privoxy</SPAN
163 >
164  program has two new command line arguments to install and uninstall
165  <SPAN
166 CLASS="APPLICATION"
167 >Privoxy</SPAN
168 > as a <SPAN
169 CLASS="emphasis"
170 ><I
171 CLASS="EMPHASIS"
172 >service</I
173 ></SPAN
174 >.</P
175 ><P
176 ></P
177 ><DIV
178 CLASS="VARIABLELIST"
179 ><DL
180 ><DT
181 >Arguments:</DT
182 ><DD
183 ><P
184 >     <TT
185 CLASS="REPLACEABLE"
186 ><I
187 >--install</I
188 ></TT
189 >[:<TT
190 CLASS="REPLACEABLE"
191 ><I
192 >service_name</I
193 ></TT
194 >]
195     </P
196 ><P
197 >     <TT
198 CLASS="REPLACEABLE"
199 ><I
200 >--uninstall</I
201 ></TT
202 >[:<TT
203 CLASS="REPLACEABLE"
204 ><I
205 >service_name</I
206 ></TT
207 >]
208     </P
209 ></DD
210 ></DL
211 ></DIV
212 ><P
213 > After invoking <SPAN
214 CLASS="APPLICATION"
215 >Privoxy</SPAN
216 > with
217  <B
218 CLASS="COMMAND"
219 >--install</B
220 >, you will need to bring up the
221  <SPAN
222 CLASS="APPLICATION"
223 >Windows</SPAN
224 > service console to assign the user you
225  want <SPAN
226 CLASS="APPLICATION"
227 >Privoxy</SPAN
228 > to run under, and whether or not you
229  want it to run whenever the system starts. You can start the
230  <SPAN
231 CLASS="APPLICATION"
232 >Windows</SPAN
233 > services console with the following
234  command: <B
235 CLASS="COMMAND"
236 >services.msc</B
237 >.  If you do not take the manual step
238  of modifying <SPAN
239 CLASS="APPLICATION"
240 >Privoxy's</SPAN
241 > service settings, it will
242  not start.  Note too that you will need to give Privoxy a user account that
243  actually exists, or it will not be permitted to
244  write to its log and configuration files.</P
245 ></DIV
246 ><DIV
247 CLASS="SECT3"
248 ><H3
249 CLASS="SECT3"
250 ><A
251 NAME="INSTALLATION-OS2"
252 >2.1.3. OS/2</A
253 ></H3
254 ><P
255 > First, make sure that no previous installations of
256  <SPAN
257 CLASS="APPLICATION"
258 >Junkbuster</SPAN
259 > and / or
260  <SPAN
261 CLASS="APPLICATION"
262 >Privoxy</SPAN
263 > are left on your
264  system. Check that no <SPAN
265 CLASS="APPLICATION"
266 >Junkbuster</SPAN
267 >
268  or <SPAN
269 CLASS="APPLICATION"
270 >Privoxy</SPAN
271 > objects are in
272  your startup folder.</P
273 ><P
274 > Then, just double-click the WarpIN self-installing archive, which will
275  guide you through the installation process. A shadow of the
276  <SPAN
277 CLASS="APPLICATION"
278 >Privoxy</SPAN
279 > executable will be placed in your
280  startup folder so it will start automatically whenever OS/2 starts.</P
281 ><P
282 > The directory you choose to install <SPAN
283 CLASS="APPLICATION"
284 >Privoxy</SPAN
285 >
286  into will contain all of the configuration files.</P
287 ></DIV
288 ><DIV
289 CLASS="SECT3"
290 ><H3
291 CLASS="SECT3"
292 ><A
293 NAME="INSTALLATION-MAC"
294 >2.1.4. Mac OS X</A
295 ></H3
296 ><P
297 > Installation instructions for the OS X platform depend upon whether
298  you downloaded a ready-built installation package (.pkg or .mpkg) or have
299  downloaded the source code.</P
300 ></DIV
301 ><DIV
302 CLASS="SECT3"
303 ><H4
304 CLASS="SECT3"
305 ><A
306 NAME="OS-X-INSTALL-FROM-PACKAGE"
307 >2.1.5. Installation from ready-built package</A
308 ></H4
309 ><P
310 > The downloaded file will either be a .pkg (for OS X 10.5 upwards) or a bzipped
311  .mpkg file (for OS X 10.4). The former can be double-clicked as is and the
312  installation will start; double-clicking the latter will unzip the .mpkg file
313  which can then be double-clicked to commence the installation.</P
314 ><P
315 > The privoxy service will automatically start after a successful installation
316  (and thereafter every time your computer starts up) however you will need to
317  configure your web browser(s) to use it. To do so, configure them to use a
318  proxy for HTTP and HTTPS at the address 127.0.0.1:8118.</P
319 ><P
320 > To prevent the privoxy service from automatically starting when your computer
321  starts up, remove or rename the file <TT
322 CLASS="LITERAL"
323 >/Library/LaunchDaemons/org.ijbswa.privoxy.plist</TT
324 >
325  (on OS X 10.5 and higher) or the folder named
326  <TT
327 CLASS="LITERAL"
328 >/Library/StartupItems/Privoxy</TT
329 > (on OS X 10.4 'Tiger').</P
330 ><P
331 > To manually start or stop the privoxy service, use the scripts startPrivoxy.sh
332  and stopPrivoxy.sh supplied in /Applications/Privoxy. They must be run from an
333  administrator account, using sudo.</P
334 ><P
335 > To uninstall, run /Applications/Privoxy/uninstall.command as sudo from an
336  administrator account.</P
337 ></DIV
338 ><DIV
339 CLASS="SECT3"
340 ><H4
341 CLASS="SECT3"
342 ><A
343 NAME="OS-X-INSTALL-FROM-SOURCE"
344 >2.1.6. Installation from source</A
345 ></H4
346 ><P
347 > To build and install the Privoxy source code on OS X you will need to obtain
348  the macsetup module from the Privoxy Sourceforge CVS repository (refer to
349  Sourceforge help for details of how to set up a CVS client to have read-only
350  access to the repository). This module contains scripts that leverage the usual
351  open-source tools (available as part of Apple's free of charge Xcode
352  distribution or via the usual open-source software package managers for OS X
353  (MacPorts, Homebrew, Fink etc.) to build and then install the privoxy binary
354  and associated files. The macsetup module's README file contains complete
355  instructions for its use.</P
356 ><P
357 > The privoxy service will automatically start after a successful installation
358  (and thereafter every time your computer starts up) however you will need to
359  configure your web browser(s) to use it. To do so, configure them to use a
360  proxy for HTTP and HTTPS at the address 127.0.0.1:8118.</P
361 ><P
362 > To prevent the privoxy service from automatically starting when your computer
363  starts up, remove or rename the file <TT
364 CLASS="LITERAL"
365 >/Library/LaunchDaemons/org.ijbswa.privoxy.plist</TT
366 >
367  (on OS X 10.5 and higher) or the folder named
368  <TT
369 CLASS="LITERAL"
370 >/Library/StartupItems/Privoxy</TT
371 > (on OS X 10.4 'Tiger').</P
372 ><P
373 > To manually start or stop the privoxy service, use the Privoxy Utility
374  for Mac OS X (also part of the macsetup module).  This application can start
375  and stop the privoxy service and display its log and configuration files.</P
376 ><P
377 > To uninstall, run the macsetup module's uninstall.sh as sudo from an
378  administrator account.</P
379 ></DIV
380 ><DIV
381 CLASS="SECT3"
382 ><H3
383 CLASS="SECT3"
384 ><A
385 NAME="INSTALLATION-FREEBSD"
386 >2.1.7. FreeBSD</A
387 ></H3
388 ><P
389 > Privoxy is part of FreeBSD's Ports Collection, you can build and install
390  it with <TT
391 CLASS="LITERAL"
392 >cd /usr/ports/www/privoxy; make install clean</TT
393 >.</P
394 ></DIV
395 ></DIV
396 ><DIV
397 CLASS="SECT2"
398 ><H2
399 CLASS="SECT2"
400 ><A
401 NAME="INSTALLATION-SOURCE"
402 >2.2. Building from Source</A
403 ></H2
404 ><P
405 > The most convenient way to obtain the <SPAN
406 CLASS="APPLICATION"
407 >Privoxy</SPAN
408 > source
409  code is to download the source tarball from our
410  <A
411 HREF="https://sourceforge.net/projects/ijbswa/files/Sources/"
412 TARGET="_top"
413 >    project download page</A
414 >,
415  or you can get the up-to-the-minute, possibly unstable, development version from
416  <A
417 HREF="https://www.privoxy.org/"
418 TARGET="_top"
419 >https://www.privoxy.org/</A
420 >.</P
421 ><P
422 > To build <SPAN
423 CLASS="APPLICATION"
424 >Privoxy</SPAN
425 > from source,
426  <A
427 HREF="http://www.gnu.org/software/autoconf/autoconf.html"
428 TARGET="_top"
429 >autoconf</A
430 >,
431  <A
432 HREF="http://www.gnu.org/software/make/make.html"
433 TARGET="_top"
434 >GNU make (gmake)</A
435 >,
436  and, of course, a C compiler like
437  <A
438 HREF="http://www.gnu.org/software/gcc/gcc.html"
439 TARGET="_top"
440 >gcc</A
441 > are required.</P
442 ><P
443 > When building from a source tarball,
444  first unpack the source:</P
445 ><TABLE
446 BORDER="0"
447 BGCOLOR="#E0E0E0"
448 WIDTH="100%"
449 ><TR
450 ><TD
451 ><PRE
452 CLASS="SCREEN"
453 > tar xzvf privoxy-3.0.27-beta-src.tar.gz
454  cd privoxy-3.0.27-beta</PRE
455 ></TD
456 ></TR
457 ></TABLE
458 ><P
459 > To build the development version, you can get the source code by doing:</P
460 ><TABLE
461 BORDER="0"
462 BGCOLOR="#E0E0E0"
463 WIDTH="100%"
464 ><TR
465 ><TD
466 ><PRE
467 CLASS="SCREEN"
468 >  cd &#60;root-dir&#62;
469   git clone https://www.privoxy.org/git/privoxy.git</PRE
470 ></TD
471 ></TR
472 ></TABLE
473 ><P
474 > This will create a directory named <TT
475 CLASS="FILENAME"
476 >&#60;root-dir&#62;/privoxy/</TT
477 >,
478  which will contain the source tree.</P
479 ><P
480 > Note that source code in GIT is development quality, and may not be
481  stable or well tested.</P
482 ><P
483 > It is strongly recommended to not run <SPAN
484 CLASS="APPLICATION"
485 >Privoxy</SPAN
486 >
487  as root. You should configure/install/run <SPAN
488 CLASS="APPLICATION"
489 >Privoxy</SPAN
490 > as
491  an unprivileged user, preferably by creating a <SPAN
492 CLASS="QUOTE"
493 >"privoxy"</SPAN
494 > user
495  and group just for this purpose. See your local documentation for the correct
496  command line to do add new users and groups (something like
497  <B
498 CLASS="COMMAND"
499 >adduser</B
500 >, but the command syntax may vary from platform
501  to platform).</P
502 ><P
503 > <TT
504 CLASS="FILENAME"
505 >/etc/passwd</TT
506 > might then look like:</P
507 ><TABLE
508 BORDER="0"
509 BGCOLOR="#E0E0E0"
510 WIDTH="100%"
511 ><TR
512 ><TD
513 ><PRE
514 CLASS="SCREEN"
515 >  privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell</PRE
516 ></TD
517 ></TR
518 ></TABLE
519 ><P
520 > And then <TT
521 CLASS="FILENAME"
522 >/etc/group</TT
523 >, like:</P
524 ><TABLE
525 BORDER="0"
526 BGCOLOR="#E0E0E0"
527 WIDTH="100%"
528 ><TR
529 ><TD
530 ><PRE
531 CLASS="SCREEN"
532 >  privoxy:*:7777:</PRE
533 ></TD
534 ></TR
535 ></TABLE
536 ><P
537 > Some binary packages may do this for you.</P
538 ><P
539 > Then, to build from either unpacked tarball or CVS source:</P
540 ><TABLE
541 BORDER="0"
542 BGCOLOR="#E0E0E0"
543 WIDTH="100%"
544 ><TR
545 ><TD
546 ><PRE
547 CLASS="SCREEN"
548 > autoheader
549  autoconf
550  ./configure      # (--help to see options)
551  make             # (the make from GNU, sometimes called gmake)
552  su               # Possibly required
553  make -n install  # (to see where all the files will go)
554  make -s install  # (to really install, -s to silence output)</PRE
555 ></TD
556 ></TR
557 ></TABLE
558 ><P
559 >  Using GNU <B
560 CLASS="COMMAND"
561 >make</B
562 >, you can have the first four steps
563   automatically done for you by just typing:</P
564 ><TABLE
565 BORDER="0"
566 BGCOLOR="#E0E0E0"
567 WIDTH="100%"
568 ><TR
569 ><TD
570 ><PRE
571 CLASS="SCREEN"
572 >  make</PRE
573 ></TD
574 ></TR
575 ></TABLE
576 ><P
577 >  in the freshly downloaded or unpacked source directory.</P
578 ><P
579 > To build an executable with security enhanced features so that
580  users cannot easily bypass the proxy (e.g. <SPAN
581 CLASS="QUOTE"
582 >"Go There Anyway"</SPAN
583 >), or
584  alter their own configurations, <B
585 CLASS="COMMAND"
586 >configure</B
587 > like this:</P
588 ><TABLE
589 BORDER="0"
590 BGCOLOR="#E0E0E0"
591 WIDTH="100%"
592 ><TR
593 ><TD
594 ><PRE
595 CLASS="SCREEN"
596 > ./configure  --disable-toggle  --disable-editor  --disable-force</PRE
597 ></TD
598 ></TR
599 ></TABLE
600 ><P
601 > Note that all of these options can also be disabled through the configuration file.</P
602 ><P
603 > <SPAN
604 CLASS="emphasis"
605 ><I
606 CLASS="EMPHASIS"
607 >WARNING:</I
608 ></SPAN
609 > If installing as root, the install will fail
610  unless a non-root user or group is specified, or a <TT
611 CLASS="LITERAL"
612 >privoxy</TT
613 >
614  user and group already exist on the system. If a non-root user is specified,
615  and no group, then the installation will try to also use a group of the same name
616  as <SPAN
617 CLASS="QUOTE"
618 >"user"</SPAN
619 >. If a group is specified (and no user), then the
620  support files will be installed as writable by that group, and owned by the
621  user running the installation.</P
622 ><P
623 > <B
624 CLASS="COMMAND"
625 >configure</B
626 > accepts <TT
627 CLASS="LITERAL"
628 >--with-user</TT
629 > and
630  <TT
631 CLASS="LITERAL"
632 >--with-group</TT
633 > options for setting user and group ownership
634  of the configuration files (which need to be writable by the daemon). The
635  specified <SPAN
636 CLASS="emphasis"
637 ><I
638 CLASS="EMPHASIS"
639 >user must already exist</I
640 ></SPAN
641 >. When starting
642  <SPAN
643 CLASS="APPLICATION"
644 >Privoxy</SPAN
645 >, it must be run as this same user to
646  insure write access to configuration and log files!</P
647 ><P
648 > Alternately, you can specify <TT
649 CLASS="LITERAL"
650 >user</TT
651 > and <TT
652 CLASS="LITERAL"
653 >group</TT
654 >
655  on the <B
656 CLASS="COMMAND"
657 >make</B
658 > command line, but be sure both already exist:</P
659 ><TABLE
660 BORDER="0"
661 BGCOLOR="#E0E0E0"
662 WIDTH="100%"
663 ><TR
664 ><TD
665 ><PRE
666 CLASS="SCREEN"
667 > make -s install  USER=privoxy GROUP=privoxy</PRE
668 ></TD
669 ></TR
670 ></TABLE
671 ><P
672 > The default installation path for <B
673 CLASS="COMMAND"
674 >make install</B
675 > is
676  <TT
677 CLASS="FILENAME"
678 >/usr/local</TT
679 >. This may of course be customized with
680  the various <B
681 CLASS="COMMAND"
682 >./configure</B
683 > path options. If you are doing
684  an install to anywhere besides <TT
685 CLASS="FILENAME"
686 >/usr/local</TT
687 >, be
688  sure to set the appropriate paths with the correct configure options
689  (<B
690 CLASS="COMMAND"
691 >./configure --help</B
692 >). Non-privileged users must of course
693  have write access permissions to wherever the target installation is going.</P
694 ><P
695 > If you do install to <TT
696 CLASS="FILENAME"
697 >/usr/local</TT
698 >, the install will use
699  <TT
700 CLASS="LITERAL"
701 >sysconfdir=$prefix/etc/privoxy</TT
702 > by default. All other
703  destinations, and the direct usage of <TT
704 CLASS="LITERAL"
705 >--sysconfdir</TT
706 > flag
707  behave like normal, i.e. will not add the extra <TT
708 CLASS="FILENAME"
709 >privoxy</TT
710 >
711  directory. This is for a safer install, as there may already exist another
712  program that uses a file with the <SPAN
713 CLASS="QUOTE"
714 >"config"</SPAN
715 > name, and thus makes
716  <TT
717 CLASS="FILENAME"
718 >/usr/local/etc</TT
719 > cleaner.</P
720 ><P
721 > If installing to <TT
722 CLASS="FILENAME"
723 >/usr/local</TT
724 >, the documentation will go
725  by default to <TT
726 CLASS="FILENAME"
727 >$prefix/share/doc</TT
728 >. But if this directory
729  doesn't exist, it will then try <TT
730 CLASS="FILENAME"
731 >$prefix/doc</TT
732 > and install
733  there before creating a new <TT
734 CLASS="FILENAME"
735 >$prefix/share/doc</TT
736 > just for
737  <SPAN
738 CLASS="APPLICATION"
739 >Privoxy</SPAN
740 >.</P
741 ><P
742 > Again, if the installs goes to <TT
743 CLASS="FILENAME"
744 >/usr/local</TT
745 >, the
746  <TT
747 CLASS="LITERAL"
748 >localstatedir</TT
749 > (ie: <TT
750 CLASS="FILENAME"
751 >var/</TT
752 >) will default
753  to <TT
754 CLASS="FILENAME"
755 >/var</TT
756 > instead of <TT
757 CLASS="LITERAL"
758 >$prefix/var</TT
759 > so
760  the logs will go to <TT
761 CLASS="FILENAME"
762 >/var/log/privoxy/</TT
763 >, and the pid file
764  will be created in <TT
765 CLASS="FILENAME"
766 >/var/run/privoxy.pid</TT
767 >.</P
768 ><P
769 > <B
770 CLASS="COMMAND"
771 >make install</B
772 > will attempt to set the correct values
773  in <TT
774 CLASS="FILENAME"
775 >config</TT
776 > (main configuration file). You should
777  check this to make sure all values are correct. If appropriate,
778  an init script will be installed, but it is up to the user to determine
779  how and where to start <SPAN
780 CLASS="APPLICATION"
781 >Privoxy</SPAN
782 >. The init
783  script should be checked for correct paths and values, if anything other than
784  a default install is done.</P
785 ><P
786 > If install finds previous versions of local configuration files, most of
787  these will not be overwritten, and the new ones will be installed with a
788  <SPAN
789 CLASS="QUOTE"
790 >"new"</SPAN
791 > extension. default.action and default.filter
792  <SPAN
793 CLASS="emphasis"
794 ><I
795 CLASS="EMPHASIS"
796 >will be overwritten</I
797 ></SPAN
798 >. You will then need
799  to manually update the other installed configuration files as needed. The
800  default template files <SPAN
801 CLASS="emphasis"
802 ><I
803 CLASS="EMPHASIS"
804 >will</I
805 ></SPAN
806 > be overwritten. If you have
807  customized, local templates, these should be stored safely in a separate
808  directory and defined in <TT
809 CLASS="FILENAME"
810 >config</TT
811 > by the
812  <SPAN
813 CLASS="QUOTE"
814 >"templdir"</SPAN
815 > directive. It is of course wise to always back-up any
816  important configuration files <SPAN
817 CLASS="QUOTE"
818 >"just in case"</SPAN
819 >. If a previous
820  version of <SPAN
821 CLASS="APPLICATION"
822 >Privoxy</SPAN
823 > is already running, you will
824  have to restart it manually.</P
825 ><P
826 > For more detailed instructions on how to build Redhat RPMs,
827  Windows self-extracting installers, building on platforms with
828  special requirements etc, please consult the <A
829 HREF="https://www.privoxy.org/developer-manual/newrelease.html"
830 TARGET="_top"
831 >developer manual</A
832 >.</P
833 ><DIV
834 CLASS="SECT3"
835 ><H3
836 CLASS="SECT3"
837 ><A
838 NAME="WINBUILD-CYGWIN"
839 >2.2.1. Windows</A
840 ></H3
841 ><DIV
842 CLASS="SECT4"
843 ><H4
844 CLASS="SECT4"
845 ><A
846 NAME="WINBUILD-SETUP"
847 >2.2.1.1. Setup</A
848 ></H4
849 ><P
850 >        Install the Cygwin utilities needed to build <SPAN
851 CLASS="APPLICATION"
852 >Privoxy</SPAN
853 >.
854         If you have a 64 bit CPU (which most people do by now), get the
855         Cygwin setup-x86_64.exe program <A
856 HREF="https://cygwin.com/setup-x86_64.exe"
857 TARGET="_top"
858 >here</A
859 >
860         (the .sig file is <A
861 HREF="https://cygwin.com/setup-x86_64.exe.sig"
862 TARGET="_top"
863 >here</A
864 >).
865       </P
866 ><P
867 >        Run the setup program and from View / Category select:
868       </P
869 ><TABLE
870 BORDER="0"
871 BGCOLOR="#E0E0E0"
872 WIDTH="100%"
873 ><TR
874 ><TD
875 ><PRE
876 CLASS="SCREEN"
877 >  Devel
878     autoconf 2.5
879     automake 1.15
880     binutils
881     cmake
882     gcc-core
883     gcc-g++
884     git
885     make
886     mingw64-i686-gcc-core
887     mingw64-i686-zlib
888   Editors
889     vim
890   Libs
891     libxslt: GNOME XSLT library (runtime)
892   Net
893     curl
894     openssh
895   Text
896     docbook-dssl
897     docbook-sgml31
898     docbook-utils
899     openjade
900   Utils
901     gnupg
902   Web
903     w3m</PRE
904 ></TD
905 ></TR
906 ></TABLE
907 ><P
908 >        If you haven't already downloaded the Privoxy source code, get it now:
909       </P
910 ><TABLE
911 BORDER="0"
912 BGCOLOR="#E0E0E0"
913 WIDTH="100%"
914 ><TR
915 ><TD
916 ><PRE
917 CLASS="SCREEN"
918 >  mkdir &#60;root-dir&#62;
919   cd &#60;root-dir&#62;
920   git clone https://www.privoxy.org/git/privoxy.git</PRE
921 ></TD
922 ></TR
923 ></TABLE
924 ><P
925 >        Get the source code (.zip or .tar.gz) for tidy from
926         <A
927 HREF="https://github.com/htacg/tidy-html5/releases"
928 TARGET="_top"
929 >                    https://github.com/htacg/tidy-html5/releases</A
930 >,
931         unzip into &#60;root-dir&#62; and build the software:
932       </P
933 ><TABLE
934 BORDER="0"
935 BGCOLOR="#E0E0E0"
936 WIDTH="100%"
937 ><TR
938 ><TD
939 ><PRE
940 CLASS="SCREEN"
941 >  cd &#60;root-dir&#62;
942   cd tidy-html5-x.y.z/build/cmake
943   cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
944   make &#38;&#38; make install</PRE
945 ></TD
946 ></TR
947 ></TABLE
948 ><P
949 >        If you want to be able to make a Windows release package, get the NSIS .zip file from
950             
951         <A
952 HREF="https://sourceforge.net/projects/nsis/files/NSIS%203/"
953 TARGET="_top"
954 >                    https://sourceforge.net/projects/nsis/files/NSIS%203/</A
955 >
956         and extract the NSIS directory to <TT
957 CLASS="LITERAL"
958 >privoxy/windows</TT
959 >.
960         Then edit the windows/GNUmakefile to set the location of the NSIS executable - eg:
961       </P
962 ><TABLE
963 BORDER="0"
964 BGCOLOR="#E0E0E0"
965 WIDTH="100%"
966 ><TR
967 ><TD
968 ><PRE
969 CLASS="SCREEN"
970 ># Path to NSIS
971 MAKENSIS = ./nsis/makensis.exe</PRE
972 ></TD
973 ></TR
974 ></TABLE
975 ></DIV
976 ><DIV
977 CLASS="SECT4"
978 ><H4
979 CLASS="SECT4"
980 ><A
981 NAME="WINBUILD-BUILD"
982 >2.2.1.2. Build</A
983 ></H4
984 ><P
985 >        To build just the Privoxy executable and not the whole installation package, do:
986       </P
987 ><TABLE
988 BORDER="0"
989 BGCOLOR="#E0E0E0"
990 WIDTH="100%"
991 ><TR
992 ><TD
993 ><PRE
994 CLASS="PROGRAMLISTING"
995 >  cd &#60;root-dir&#62;/privoxy
996   ./windows/MYconfigure &#38;&#38; make</PRE
997 ></TD
998 ></TR
999 ></TABLE
1000 ><P
1001 >        Privoxy uses the <A
1002 HREF="https://en.wikipedia.org/wiki/GNU_build_system"
1003 TARGET="_top"
1004 >GNU Autotools</A
1005 >
1006         for building software, so the process is:
1007       </P
1008 ><TABLE
1009 BORDER="0"
1010 BGCOLOR="#E0E0E0"
1011 WIDTH="100%"
1012 ><TR
1013 ><TD
1014 ><PRE
1015 CLASS="PROGRAMLISTING"
1016 >  $ autoheader              # creates config.h.in
1017   $ autoconf                # uses config.h.in to create the configure shell script
1018   $ ./configure [options]   # creates GNUmakefile
1019   $ make        [options]   # builds the program</PRE
1020 ></TD
1021 ></TR
1022 ></TABLE
1023 ><P
1024 >        The usual <TT
1025 CLASS="LITERAL"
1026 >configure</TT
1027 > options for building a native Windows application under cygwin are
1028       </P
1029 ><TABLE
1030 BORDER="0"
1031 BGCOLOR="#E0E0E0"
1032 WIDTH="100%"
1033 ><TR
1034 ><TD
1035 ><PRE
1036 CLASS="LITERALLAYOUT"
1037 >  --host=i686-w64-mingw32
1038   --enable-mingw32
1039   --enable-zlib
1040   --enable-static-linking
1041   --disable-pthread
1042   --disable-dynamic-pcre</PRE
1043 ></TD
1044 ></TR
1045 ></TABLE
1046 ><P
1047 >        You can set the <TT
1048 CLASS="LITERAL"
1049 >CFLAGS</TT
1050 > and <TT
1051 CLASS="LITERAL"
1052 >LDFLAGS</TT
1053 > envars before
1054         running <TT
1055 CLASS="LITERAL"
1056 >configure</TT
1057 > to set compiler and linker flags.  For example:
1058       </P
1059 ><TABLE
1060 BORDER="0"
1061 BGCOLOR="#E0E0E0"
1062 WIDTH="100%"
1063 ><TR
1064 ><TD
1065 ><PRE
1066 CLASS="PROGRAMLISTING"
1067 >  $ export CFLAGS="-O2"              # set gcc optimization level
1068   $ export LDFLAGS="-Wl,--nxcompat"  # Enable DEP
1069   $ ./configure --host=i686-w64-mingw32 --enable-mingw32  --enable-zlib \
1070   &#62;             --enable-static-linking --disable-pthread --disable-dynamic-pcre
1071   $ make                             # build Privoxy</PRE
1072 ></TD
1073 ></TR
1074 ></TABLE
1075 ><P
1076 >        See the <A
1077 HREF="../developer-manual/newrelease.html#NEWRELEASE-WINDOWS"
1078 TARGET="_top"
1079 >Developer's Manual</A
1080 >
1081         for building a Windows release package.
1082       </P
1083 ></DIV
1084 ></DIV
1085 ></DIV
1086 ><DIV
1087 CLASS="SECT2"
1088 ><H2
1089 CLASS="SECT2"
1090 ><A
1091 NAME="INSTALLATION-KEEPUPDATED"
1092 >2.3. Keeping your Installation Up-to-Date</A
1093 ></H2
1094 ><P
1095 > If you wish to receive an email notification whenever we release updates of
1096  <SPAN
1097 CLASS="APPLICATION"
1098 >Privoxy</SPAN
1099 > or the actions file, <A
1100 HREF="https://lists.privoxy.org/mailman/listinfo/privoxy-announce"
1101 TARGET="_top"
1102 >subscribe
1103  to our announce mailing list</A
1104 >, privoxy-announce@lists.privoxy.org.</P
1105 ><P
1106 > In order not to lose your personal changes and adjustments when updating
1107  to the latest <TT
1108 CLASS="LITERAL"
1109 >default.action</TT
1110 > file we <SPAN
1111 CLASS="emphasis"
1112 ><I
1113 CLASS="EMPHASIS"
1114 >strongly
1115  recommend</I
1116 ></SPAN
1117 > that you use <TT
1118 CLASS="LITERAL"
1119 >user.action</TT
1120 > and
1121  <TT
1122 CLASS="LITERAL"
1123 >user.filter</TT
1124 > for your local
1125  customizations of <SPAN
1126 CLASS="APPLICATION"
1127 >Privoxy</SPAN
1128 >. See the <A
1129 HREF="actions-file.html"
1130 >Chapter on actions files</A
1131 > for details.</P
1132 ></DIV
1133 ></DIV
1134 ><DIV
1135 CLASS="NAVFOOTER"
1136 ><HR
1137 ALIGN="LEFT"
1138 WIDTH="100%"><TABLE
1139 SUMMARY="Footer navigation table"
1140 WIDTH="100%"
1141 BORDER="0"
1142 CELLPADDING="0"
1143 CELLSPACING="0"
1144 ><TR
1145 ><TD
1146 WIDTH="33%"
1147 ALIGN="left"
1148 VALIGN="top"
1149 ><A
1150 HREF="introduction.html"
1151 ACCESSKEY="P"
1152 >Prev</A
1153 ></TD
1154 ><TD
1155 WIDTH="34%"
1156 ALIGN="center"
1157 VALIGN="top"
1158 ><A
1159 HREF="index.html"
1160 ACCESSKEY="H"
1161 >Home</A
1162 ></TD
1163 ><TD
1164 WIDTH="33%"
1165 ALIGN="right"
1166 VALIGN="top"
1167 ><A
1168 HREF="whatsnew.html"
1169 ACCESSKEY="N"
1170 >Next</A
1171 ></TD
1172 ></TR
1173 ><TR
1174 ><TD
1175 WIDTH="33%"
1176 ALIGN="left"
1177 VALIGN="top"
1178 >Introduction</TD
1179 ><TD
1180 WIDTH="34%"
1181 ALIGN="center"
1182 VALIGN="top"
1183 >&nbsp;</TD
1184 ><TD
1185 WIDTH="33%"
1186 ALIGN="right"
1187 VALIGN="top"
1188 >What's New in this Release</TD
1189 ></TR
1190 ></TABLE
1191 ></DIV
1192 ></BODY
1193 ></HTML
1194 >