Home Explore Blog CI



postgresql

6th chunk of `doc/src/sgml/installation.sgml`
b3dacb5fb72d023e9d539c9f79ff45cb1d016327f5019cb00000000100000fa3
 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>
   </indexterm>

   <para>
    The first step of the installation procedure is to configure the
    source tree for your system and choose the options you would like.
    This is done by running the <filename>configure</filename> script. For a
    default installation simply enter:
<screen>
<userinput>./configure</userinput>
</screen>
    This script will run a number of tests to determine values for various
    system dependent variables and detect any quirks of your
    operating system, and finally will create several files in the
    build tree to record what it found.
   </para>

   <para>
    You can also run <filename>configure</filename> in a directory outside
    the source tree, and then build there, if you want to keep the build
    directory separate from the original source files.  This procedure is
    called a
    <indexterm><primary>VPATH</primary></indexterm><firstterm>VPATH</firstterm>
    build.  Here's how:
<screen>
<userinput>mkdir build_dir</userinput>
<userinput>cd build_dir</userinput>
<userinput>/path/to/source/tree/configure [options go here]</userinput>
<userinput>make</userinput>
</screen>
   </para>

   <para>
    The default configuration will build the server and utilities, as
    well as all client applications and interfaces that require only a
    C compiler. All files will be installed under
    <filename>/usr/local/pgsql</filename> by default.
   </para>

   <para>
    You can customize the build and installation process by supplying one
    or more command line options to <filename>configure</filename>.
    Typically you would customize the install location, or the set of
    optional features that are built.  <filename>configure</filename>
    has a large number of options, which are described in
    <xref linkend="configure-options"/>.
   </para>

   <para>
    Also, <filename>configure</filename> responds to certain environment
    variables, as described in <xref linkend="configure-envvars"/>.
    These provide additional ways to customize the configuration.
   </para>
  </step>

  <step id="build">
   <title>Build</title>

   <para>
    To start the build, type either of:
<screen>
<userinput>make</userinput>
<userinput>make all</userinput>
</screen>
    (Remember to use <acronym>GNU</acronym> <application>make</application>.)
    The build will take a few minutes depending on your
    hardware.
   </para>

  <para>
   If you want to build everything that can be built, including the
   documentation (HTML and man pages), and the additional modules
   (<filename>contrib</filename>), type instead:
<screen>
<userinput>make world</userinput>
</screen>
  </para>

  <para>
   If you want to build everything that can be built, including the
   additional modules (<filename>contrib</filename>), but without
   the documentation, type instead:
<screen>
<userinput>make world-bin</userinput>
</screen>
   </para>

   <para>
    If you want to invoke the build from another makefile rather than
    manually, you must unset

Title: PostgreSQL Building and Installation with Autoconf and Make
Summary
The installation procedure for PostgreSQL using Autoconf and Make involves configuring the source tree, building the software, and installing it, with options to customize the build and installation process, including setting install locations and optional features, and using environment variables to further customize the configuration.