gooderp18绿色标准版
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

191 lines
14KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>16.2. Requirements</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="install-short.html" title="16.1. Short Version" /><link rel="next" href="install-getsource.html" title="16.3. Getting the Source" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">16.2. Requirements</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="install-short.html" title="16.1. Short Version">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="installation.html" title="Chapter 16. Installation from Source Code">Up</a></td><th width="60%" align="center">Chapter 16. Installation from Source Code</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="install-getsource.html" title="16.3. Getting the Source">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="INSTALL-REQUIREMENTS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">16.2. Requirements</h2></div></div></div><p>
  3. In general, a modern Unix-compatible platform should be able to run
  4. <span class="productname">PostgreSQL</span>.
  5. The platforms that had received specific testing at the
  6. time of release are described in <a class="xref" href="supported-platforms.html" title="16.6. Supported Platforms">Section 16.6</a>
  7. below.
  8. </p><p>
  9. The following software packages are required for building
  10. <span class="productname">PostgreSQL</span>:
  11. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  12. <a id="id-1.6.3.6.3.2.1.1.1" class="indexterm"></a>
  13. <acronym class="acronym">GNU</acronym> <span class="application">make</span> version 3.80 or newer is required; other
  14. <span class="application">make</span> programs or older <acronym class="acronym">GNU</acronym> <span class="application">make</span> versions will <span class="emphasis"><em>not</em></span> work.
  15. (<acronym class="acronym">GNU</acronym> <span class="application">make</span> is sometimes installed under
  16. the name <code class="filename">gmake</code>.) To test for <acronym class="acronym">GNU</acronym>
  17. <span class="application">make</span> enter:
  18. </p><pre class="screen">
  19. <strong class="userinput"><code>make --version</code></strong>
  20. </pre><p>
  21. </p></li><li class="listitem"><p>
  22. You need an <acronym class="acronym">ISO</acronym>/<acronym class="acronym">ANSI</acronym> C compiler (at least
  23. C99-compliant). Recent
  24. versions of <span class="productname">GCC</span> are recommended, but
  25. <span class="productname">PostgreSQL</span> is known to build using a wide variety
  26. of compilers from different vendors.
  27. </p></li><li class="listitem"><p>
  28. <span class="application">tar</span> is required to unpack the source
  29. distribution, in addition to either
  30. <span class="application">gzip</span> or <span class="application">bzip2</span>.
  31. </p></li><li class="listitem"><p>
  32. <a id="id-1.6.3.6.3.2.4.1.1" class="indexterm"></a>
  33. <a id="id-1.6.3.6.3.2.4.1.2" class="indexterm"></a>
  34. The <acronym class="acronym">GNU</acronym> <span class="productname">Readline</span> library is used by
  35. default. It allows <span class="application">psql</span> (the
  36. PostgreSQL command line SQL interpreter) to remember each
  37. command you type, and allows you to use arrow keys to recall and
  38. edit previous commands. This is very helpful and is strongly
  39. recommended. If you don't want to use it then you must specify
  40. the <code class="option">--without-readline</code> option to
  41. <code class="filename">configure</code>. As an alternative, you can often use the
  42. BSD-licensed <code class="filename">libedit</code> library, originally
  43. developed on <span class="productname">NetBSD</span>. The
  44. <code class="filename">libedit</code> library is
  45. GNU <span class="productname">Readline</span>-compatible and is used if
  46. <code class="filename">libreadline</code> is not found, or if
  47. <code class="option">--with-libedit-preferred</code> is used as an
  48. option to <code class="filename">configure</code>. If you are using a package-based
  49. Linux distribution, be aware that you need both the
  50. <code class="literal">readline</code> and <code class="literal">readline-devel</code> packages, if
  51. those are separate in your distribution.
  52. </p></li><li class="listitem"><p>
  53. <a id="id-1.6.3.6.3.2.5.1.1" class="indexterm"></a>
  54. The <span class="productname">zlib</span> compression library is
  55. used by default. If you don't want to use it then you must
  56. specify the <code class="option">--without-zlib</code> option to
  57. <code class="filename">configure</code>. Using this option disables
  58. support for compressed archives in <span class="application">pg_dump</span> and
  59. <span class="application">pg_restore</span>.
  60. </p></li></ul></div><p>
  61. </p><p>
  62. The following packages are optional. They are not required in the
  63. default configuration, but they are needed when certain build
  64. options are enabled, as explained below:
  65. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  66. To build the server programming language
  67. <span class="application">PL/Perl</span> you need a full
  68. <span class="productname">Perl</span> installation, including the
  69. <code class="filename">libperl</code> library and the header files.
  70. The minimum required version is <span class="productname">Perl</span> 5.8.3.
  71. Since <span class="application">PL/Perl</span> will be a shared
  72. library, the <a id="id-1.6.3.6.4.1.1.1.6" class="indexterm"></a>
  73. <code class="filename">libperl</code> library must be a shared library
  74. also on most platforms. This appears to be the default in
  75. recent <span class="productname">Perl</span> versions, but it was not
  76. in earlier versions, and in any case it is the choice of whomever
  77. installed Perl at your site. <code class="filename">configure</code> will fail
  78. if building <span class="application">PL/Perl</span> is selected but it cannot
  79. find a shared <code class="filename">libperl</code>. In that case, you will have
  80. to rebuild and install <span class="productname">Perl</span> manually to be
  81. able to build <span class="application">PL/Perl</span>. During the
  82. configuration process for <span class="productname">Perl</span>, request a
  83. shared library.
  84. </p><p>
  85. If you intend to make more than incidental use of
  86. <span class="application">PL/Perl</span>, you should ensure that the
  87. <span class="productname">Perl</span> installation was built with the
  88. <code class="literal">usemultiplicity</code> option enabled (<code class="literal">perl -V</code>
  89. will show whether this is the case).
  90. </p></li><li class="listitem"><p>
  91. To build the <span class="application">PL/Python</span> server programming
  92. language, you need a <span class="productname">Python</span>
  93. installation with the header files and
  94. the <span class="application">distutils</span> module. The minimum
  95. required version is <span class="productname">Python</span> 2.4.
  96. <span class="productname">Python 3</span> is supported if it's
  97. version 3.1 or later; but see
  98. <a class="xref" href="plpython-python23.html" title="45.1. Python 2 vs. Python 3">Section 45.1</a>
  99. when using Python 3.
  100. </p><p>
  101. Since <span class="application">PL/Python</span> will be a shared
  102. library, the <a id="id-1.6.3.6.4.1.2.2.2" class="indexterm"></a>
  103. <code class="filename">libpython</code> library must be a shared library
  104. also on most platforms. This is not the case in a default
  105. <span class="productname">Python</span> installation built from source, but a
  106. shared library is available in many operating system
  107. distributions. <code class="filename">configure</code> will fail if
  108. building <span class="application">PL/Python</span> is selected but it cannot
  109. find a shared <code class="filename">libpython</code>. That might mean that you
  110. either have to install additional packages or rebuild (part of) your
  111. <span class="productname">Python</span> installation to provide this shared
  112. library. When building from source, run <span class="productname">Python</span>'s
  113. configure with the <code class="literal">--enable-shared</code> flag.
  114. </p></li><li class="listitem"><p>
  115. To build the <span class="application">PL/Tcl</span>
  116. procedural language, you of course need a <span class="productname">Tcl</span>
  117. installation. The minimum required version is
  118. <span class="productname">Tcl</span> 8.4.
  119. </p></li><li class="listitem"><p>
  120. To enable Native Language Support (<acronym class="acronym">NLS</acronym>), that
  121. is, the ability to display a program's messages in a language
  122. other than English, you need an implementation of the
  123. <span class="application">Gettext</span> <acronym class="acronym">API</acronym>. Some operating
  124. systems have this built-in (e.g., <span class="systemitem">Linux</span>, <span class="systemitem">NetBSD</span>,
  125. <span class="systemitem">Solaris</span>), for other systems you
  126. can download an add-on package from <a class="ulink" href="http://www.gnu.org/software/gettext/" target="_top">http://www.gnu.org/software/gettext/</a>.
  127. If you are using the <span class="application">Gettext</span> implementation in
  128. the <acronym class="acronym">GNU</acronym> C library then you will additionally
  129. need the <span class="productname">GNU Gettext</span> package for some
  130. utility programs. For any of the other implementations you will
  131. not need it.
  132. </p></li><li class="listitem"><p>
  133. You need <span class="productname">OpenSSL</span>, if you want to support
  134. encrypted client connections. <span class="productname">OpenSSL</span> is
  135. also required for random number generation on platforms that do not
  136. have <code class="filename">/dev/urandom</code> (except Windows). The minimum
  137. version required is 0.9.8.
  138. </p></li><li class="listitem"><p>
  139. You need <span class="application">Kerberos</span>, <span class="productname">OpenLDAP</span>,
  140. and/or <span class="application">PAM</span>, if you want to support authentication
  141. using those services.
  142. </p></li><li class="listitem"><p>
  143. To build the <span class="productname">PostgreSQL</span> documentation,
  144. there is a separate set of requirements; see
  145. <a class="xref" href="docguide-toolsets.html" title="J.2. Tool Sets">Section J.2</a>.
  146. </p></li></ul></div><p>
  147. </p><p>
  148. If you are building from a <span class="productname">Git</span> tree instead of
  149. using a released source package, or if you want to do server development,
  150. you also need the following packages:
  151. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  152. <a id="id-1.6.3.6.5.2.1.1.1" class="indexterm"></a>
  153. <a id="id-1.6.3.6.5.2.1.1.2" class="indexterm"></a>
  154. <a id="id-1.6.3.6.5.2.1.1.3" class="indexterm"></a>
  155. <a id="id-1.6.3.6.5.2.1.1.4" class="indexterm"></a>
  156. <span class="application">Flex</span> and <span class="application">Bison</span>
  157. are needed to build from a Git checkout, or if you changed the actual
  158. scanner and parser definition files. If you need them, be sure
  159. to get <span class="application">Flex</span> 2.5.31 or later and
  160. <span class="application">Bison</span> 1.875 or later. Other <span class="application">lex</span>
  161. and <span class="application">yacc</span> programs cannot be used.
  162. </p></li><li class="listitem"><p>
  163. <a id="id-1.6.3.6.5.2.2.1.1" class="indexterm"></a>
  164. <span class="application">Perl</span> 5.8.3 or later is needed to build from a Git checkout,
  165. or if you changed the input files for any of the build steps that
  166. use Perl scripts. If building on Windows you will need
  167. <span class="application">Perl</span> in any case. <span class="application">Perl</span> is
  168. also required to run some test suites.
  169. </p></li></ul></div><p>
  170. </p><p>
  171. If you need to get a <acronym class="acronym">GNU</acronym> package, you can find
  172. it at your local <acronym class="acronym">GNU</acronym> mirror site (see <a class="ulink" href="https://www.gnu.org/prep/ftp" target="_top">https://www.gnu.org/prep/ftp</a>
  173. for a list) or at <a class="ulink" href="ftp://ftp.gnu.org/gnu/" target="_top">ftp://ftp.gnu.org/gnu/</a>.
  174. </p><p>
  175. Also check that you have sufficient disk space. You will need about
  176. 100 MB for the source tree during compilation and about 20 MB for
  177. the installation directory. An empty database cluster takes about
  178. 35 MB; databases take about five times the amount of space that a
  179. flat text file with the same data would take. If you are going to
  180. run the regression tests you will temporarily need up to an extra
  181. 150 MB. Use the <code class="command">df</code> command to check free disk
  182. space.
  183. </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="install-short.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="installation.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="install-getsource.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">16.1. Short Version </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 16.3. Getting the Source</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1