client connections. <productname>OpenSSL</productname> is
also required for random number generation on platforms that do not
have <filename>/dev/urandom</filename> (except Windows). The minimum
required version is 1.1.1.
</para>
<para>
Additionally, <productname>LibreSSL</productname> is supported using the
<productname>OpenSSL</productname> compatibility layer. The minimum
required version is 3.4 (from <systemitem class="osname">OpenBSD</systemitem>
version 7.0).
</para>
</listitem>
<listitem>
<para>
You need <application>MIT Kerberos</application> (for GSSAPI),
<productname>OpenLDAP</productname>, and/or <application>PAM</application>,
if you want to support authentication using those services.
</para>
</listitem>
<listitem>
<para>
You need <productname>Curl</productname> to build an optional module
which implements the <link linkend="libpq-oauth">OAuth Device
Authorization flow</link> for client applications.
</para>
</listitem>
<listitem>
<para>
You need <productname>LZ4</productname>, if you want to support
compression of data with that method; see
<xref linkend="guc-default-toast-compression"/> and
<xref linkend="guc-wal-compression"/>.
</para>
</listitem>
<listitem>
<para>
You need <productname>Zstandard</productname>, if you want to support
compression of data with that method; see
<xref linkend="guc-wal-compression"/>.
The minimum required version is 1.4.0.
</para>
</listitem>
<listitem>
<para>
To build the <productname>PostgreSQL</productname> documentation,
there is a separate set of requirements; see
<xref linkend="docguide-toolsets"/>.
</para>
</listitem>
</itemizedlist>
</para>
<para>
If you need to get a <acronym>GNU</acronym> package, you can find
it at your local <acronym>GNU</acronym> mirror site (see <ulink
url="https://www.gnu.org/prep/ftp"></ulink>
for a list) or at <ulink
url="ftp://ftp.gnu.org/gnu/"></ulink>.
</para>
</sect1>
<sect1 id="install-getsource">
<title>Getting the Source</title>
<para>
The <productname>PostgreSQL</productname> source code for released versions
can be obtained from the download section of our website:
<ulink url="https://www.postgresql.org/ftp/source/"></ulink>.
Download the
<filename>postgresql-<replaceable>version</replaceable>.tar.gz</filename>
or <filename>postgresql-<replaceable>version</replaceable>.tar.bz2</filename>
file you're interested in, then unpack it:
<screen>
<userinput>tar xf postgresql-<replaceable>version</replaceable>.tar.bz2</userinput>
</screen>
This will create a directory
<filename>postgresql-<replaceable>version</replaceable></filename> under
the current directory with the <productname>PostgreSQL</productname> sources.
Change into that directory for the rest of the installation procedure.
</para>
<para>
Alternatively, you can use the Git version control system; see
<xref linkend="git"/> for more information.
</para>
</sect1>
<sect1 id="install-make">
<title>Building and Installation with Autoconf and Make</title>
<sect2 id="install-short-make">
<title>Short Version</title>
<para>
<synopsis>
./configure
make
su
make install
adduser postgres
mkdir -p /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
</synopsis>
The long version is the rest of this
<phrase>section</phrase>.
</para>
</sect2>
<sect2 id="install-procedure-make">
<title>Installation Procedure</title>
<procedure>
<step id="configure">
<title>Configuration</title>
<indexterm zone="configure">
<primary>configure</primary>