INSTALL 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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-2009 the
  8. * Privoxy team. https://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/licenses/old-licenses/gpl-2.0.html
  29. * or write to the Free Software Foundation, Inc.,
  30. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
  31. * USA
  32. *
  33. *********************************************************************/
  34. -------------------------------------------------------------------------------
  35. To build Privoxy from source, autoconf, GNU make (gmake), and, of course, a C
  36. compiler like gcc are required.
  37. When building from a source tarball, first unpack the source:
  38. tar xzvf privoxy-3.0.29-stable-src.tar.gz
  39. cd privoxy-3.0.29-stable
  40. To build the development version, you can get the source code by doing:
  41. cd <root-dir>
  42. git clone https://www.privoxy.org/git/privoxy.git
  43. This will create a directory named <root-dir>/privoxy/, which will contain the
  44. source tree.
  45. Note that source code in Git is development quality, and may not be stable or
  46. well tested.
  47. It is strongly recommended to not run Privoxy as root. You should configure/
  48. install/run Privoxy as an unprivileged user, preferably by creating a "privoxy"
  49. user and group just for this purpose. See your local documentation for the
  50. correct command line to do add new users and groups (something like adduser,
  51. but the command syntax may vary from platform to platform).
  52. /etc/passwd might then look like:
  53. privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell
  54. And then /etc/group, like:
  55. privoxy:*:7777:
  56. Some binary packages may do this for you.
  57. Then, to build from either unpacked tarball or Git checkout:
  58. autoheader
  59. autoconf
  60. ./configure # (--help to see options)
  61. make # (the make from GNU, sometimes called gmake)
  62. su # Possibly required
  63. make -n install # (to see where all the files will go)
  64. make -s install # (to really install, -s to silence output)
  65. Using GNU make, you can have the first four steps automatically done for you by
  66. just typing:
  67. make
  68. in the freshly downloaded or unpacked source directory.
  69. To build an executable with security enhanced features so that users cannot
  70. easily bypass the proxy (e.g. "Go There Anyway"), or alter their own
  71. configurations, configure like this:
  72. ./configure --disable-toggle --disable-editor --disable-force
  73. Note that all of these options can also be disabled through the configuration
  74. file.
  75. WARNING: If installing as root, the install will fail unless a non-root user or
  76. group is specified, or a privoxy user and group already exist on the system. If
  77. a non-root user is specified, and no group, then the installation will try to
  78. also use a group of the same name as "user". If a group is specified (and no
  79. user), then the support files will be installed as writable by that group, and
  80. owned by the user running the installation.
  81. configure accepts --with-user and --with-group options for setting user and
  82. group ownership of the configuration files (which need to be writable by the
  83. daemon). The specified user must already exist. When starting Privoxy, it must
  84. be run as this same user to insure write access to configuration and log files!
  85. Alternately, you can specify user and group on the make command line, but be
  86. sure both already exist:
  87. make -s install USER=privoxy GROUP=privoxy
  88. The default installation path for make install is /usr/local. This may of
  89. course be customized with the various ./configure path options. If you are
  90. doing an install to anywhere besides /usr/local, be sure to set the appropriate
  91. paths with the correct configure options (./configure --help). Non-privileged
  92. users must of course have write access permissions to wherever the target
  93. installation is going.
  94. If you do install to /usr/local, the install will use sysconfdir=$prefix/etc/
  95. privoxy by default. All other destinations, and the direct usage of
  96. --sysconfdir flag behave like normal, i.e. will not add the extra privoxy
  97. directory. This is for a safer install, as there may already exist another
  98. program that uses a file with the "config" name, and thus makes /usr/local/etc
  99. cleaner.
  100. If installing to /usr/local, the documentation will go by default to $prefix/
  101. share/doc. But if this directory doesn't exist, it will then try $prefix/doc
  102. and install there before creating a new $prefix/share/doc just for Privoxy.
  103. Again, if the installs goes to /usr/local, the localstatedir (ie: var/) will
  104. default to /var instead of $prefix/var so the logs will go to /var/log/privoxy
  105. /, and the pid file will be created in /var/run/privoxy.pid.
  106. make install will attempt to set the correct values in config (main
  107. configuration file). You should check this to make sure all values are correct.
  108. If appropriate, an init script will be installed, but it is up to the user to
  109. determine how and where to start Privoxy. The init script should be checked for
  110. correct paths and values, if anything other than a default install is done.
  111. If install finds previous versions of local configuration files, most of these
  112. will not be overwritten, and the new ones will be installed with a "new"
  113. extension. default.action and default.filter will be overwritten. You will then
  114. need to manually update the other installed configuration files as needed. The
  115. default template files will be overwritten. If you have customized, local
  116. templates, these should be stored safely in a separate directory and defined in
  117. config by the "templdir" directive. It is of course wise to always back-up any
  118. important configuration files "just in case". If a previous version of Privoxy
  119. is already running, you will have to restart it manually.
  120. For more detailed instructions on how to build Redhat RPMs, Windows
  121. self-extracting installers, building on platforms with special requirements
  122. etc, please consult the developer manual.
  123. The simplest command line to start Privoxy is $path/privoxy --user=privoxy
  124. $path/etc/privoxy/config. See privoxy --usage, or the man page, for other
  125. options, and configuration.