Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/installation.sgml`
ff5c9bf700c7090ce87371e49b0a2a76166d2a0037615f600000000100000fa0
<!-- doc/src/sgml/installation.sgml -->

<chapter id="installation">
 <title>Installation from Source Code</title>

 <indexterm zone="installation">
  <primary>installation</primary>
 </indexterm>

 <para>
  This chapter describes the installation of
  <productname>PostgreSQL</productname> using the source code
  distribution.  If you are installing a pre-packaged distribution,
  such as an RPM or Debian package, ignore this chapter
  and see <xref linkend="install-binaries" /> instead.
 </para>

 <sect1 id="install-requirements">
  <title>Requirements</title>

  <para>
   In general, a modern Unix-compatible platform should be able to run
   <productname>PostgreSQL</productname>.
   The platforms that had received specific testing at the
   time of release are described in <xref linkend="supported-platforms"/>
   below.
  </para>

  <para>
   The following software packages are required for building
   <productname>PostgreSQL</productname>:

   <itemizedlist>
    <listitem>
     <para>
      <indexterm>
       <primary>make</primary>
      </indexterm>

      <acronym>GNU</acronym> <application>make</application> version 3.81 or newer is required; other
      <application>make</application> programs or older <acronym>GNU</acronym> <application>make</application> versions will <emphasis>not</emphasis> work.
      (<acronym>GNU</acronym> <application>make</application> is sometimes installed under
      the name <filename>gmake</filename>.)  To test for <acronym>GNU</acronym>
      <application>make</application> enter:
<screen>
<userinput>make --version</userinput>
</screen>
     </para>
    </listitem>

    <listitem>
     <para>
      <indexterm>
       <primary>Meson</primary>
      </indexterm>

      Alternatively, <productname>PostgreSQL</productname> can be built using
      <ulink url="https://mesonbuild.com/">Meson</ulink>.  This is the only
      option for building <productname>PostgreSQL</productname> on Windows
      using <productname>Visual Studio</productname>.  For other platforms,
      using <application>Meson</application> is currently experimental.  If
      you choose to use <application>Meson</application>, then you don't need
      <acronym>GNU</acronym> <application>make</application>, but the other
      requirements below still apply.
     </para>

     <para>
      The minimum required version of <application>Meson</application> is 0.54.
     </para>
    </listitem>

    <listitem>
     <para>
      You need an <acronym>ISO</acronym>/<acronym>ANSI</acronym> C compiler (at least
      C99-compliant). Recent
      versions of <productname>GCC</productname> are recommended, but
      <productname>PostgreSQL</productname> is known to build using a wide variety
      of compilers from different vendors.
     </para>
    </listitem>

    <listitem>
     <para>
      <application>tar</application> is required to unpack the source
      distribution, in addition to either
      <application>gzip</application> or <application>bzip2</application>.
     </para>
    </listitem>

    <listitem>
     <para>
      <indexterm>
       <primary>flex</primary>
      </indexterm>
      <indexterm>
       <primary>lex</primary>
      </indexterm>
      <indexterm>
       <primary>bison</primary>
      </indexterm>
      <indexterm>
       <primary>yacc</primary>
      </indexterm>

      <application>Flex</application> and <application>Bison</application> are
      required.  Other <application>lex</application> and
      <application>yacc</application> programs cannot be used.
      <application>Bison</application> needs to be at least version 2.3.
     </para>
    </listitem>

    <listitem>
     <para>
      <indexterm>
       <primary>perl</primary>
      </indexterm>

      <application>Perl</application> 5.14 or later is needed during the build
      process and to run some test suites.  (This requirement is separate from
      the requirements for building <application>PL/Perl</application>; see
      below.)
   

Title: PostgreSQL Installation from Source Code
Summary
This chapter describes the installation of PostgreSQL using source code distribution, including requirements such as GNU make, Meson, an ISO/ANSI C compiler, and other software packages like flex, bison, and perl.