summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/standalone-install.xml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
commit311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 (patch)
tree0ec307299b1dada3701e42f4ca6eda57d708261e /doc/src/sgml/standalone-install.xml
parentInitial commit. (diff)
downloadpostgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.tar.xz
postgresql-15-311bcfc6b3acdd6fd152798c7f287ddf74fa2a98.zip
Adding upstream version 15.4.upstream/15.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/src/sgml/standalone-install.xml')
-rw-r--r--doc/src/sgml/standalone-install.xml171
1 files changed, 171 insertions, 0 deletions
diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml
new file mode 100644
index 0000000..5cb3bb3
--- /dev/null
+++ b/doc/src/sgml/standalone-install.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!--
+This file contains the stand-alone installation instructions that end up in
+the INSTALL file. This document stitches together parts of the installation
+instructions in the main documentation with some material that only appears
+in the stand-alone version.
+-->
+<article id="installation">
+ <title><productname>PostgreSQL</productname> Installation from Source Code</title>
+
+ <!-- This text replaces the introductory text of installation.sgml -->
+ <para>
+ This document describes the installation of
+ <productname>PostgreSQL</productname> using this source code distribution.
+ </para>
+
+ <para>
+ If you are building <productname>PostgreSQL</productname> for Microsoft
+ Windows, read this document if you intend to build with MinGW or Cygwin;
+ but if you intend to build with Microsoft's <productname>Visual
+ C++</productname>, see the main documentation instead.
+ </para>
+
+ <xi:include href="postgres.sgml" xpointer="install-short" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.sgml" xpointer="install-requirements" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.sgml" xpointer="install-procedure" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.sgml" xpointer="install-post" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+ <sect1 id="install-getting-started">
+ <title>Getting Started</title>
+
+ <para>
+ The following is a quick summary of how to get <productname>PostgreSQL</productname> up and
+ running once installed. The main documentation contains more information.
+ </para>
+
+ <procedure>
+ <step>
+ <para>
+ Create a user account for the <productname>PostgreSQL</productname>
+ server. This is the user the server will run as. For production
+ use you should create a separate, unprivileged account
+ (<quote>postgres</quote> is commonly used). If you do not have root
+ access or just want to play around, your own user account is
+ enough, but running the server as root is a security risk and
+ will not work.
+<screen><userinput>adduser postgres</userinput></screen>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database installation with the <command>initdb</command>
+ command. To run <command>initdb</command> you must be logged in to your
+ <productname>PostgreSQL</productname> server account. It will not work as
+ root.
+<screen>root# <userinput>mkdir /usr/local/pgsql/data</userinput>
+root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
+root# <userinput>su - postgres</userinput>
+postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</userinput></screen>
+ </para>
+
+ <para>
+ The <option>-D</option> option specifies the location where the data
+ will be stored. You can use any path you want, it does not have
+ to be under the installation directory. Just make sure that the
+ server account can write to the directory (or create it, if it
+ doesn't already exist) before starting <command>initdb</command>, as
+ illustrated here.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ At this point, if you did not use the <command>initdb</command> <literal>-A</literal>
+ option, you might want to modify <filename>pg_hba.conf</filename> to control
+ local access to the server before you start it. The default is to
+ trust all local users.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ The previous <command>initdb</command> step should have told you how to
+ start up the database server. Do so now. The command should look
+ something like:
+<programlisting>/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start</programlisting>
+ </para>
+
+ <para>
+ To stop a server running in the background you can type:
+<programlisting>/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop</programlisting>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database:
+<screen><userinput>/usr/local/pgsql/bin/createdb testdb</userinput></screen>
+ Then enter:
+<screen><userinput>/usr/local/pgsql/bin/psql testdb</userinput></screen>
+ to connect to that database. At the prompt you can enter SQL
+ commands and start experimenting.
+ </para>
+ </step>
+ </procedure>
+ </sect1>
+
+ <sect1 id="install-whatnow">
+ <title>What Now?</title>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <productname>PostgreSQL</productname> distribution contains a
+ comprehensive documentation set, which you should read sometime.
+ After installation, the documentation can be accessed by
+ pointing your browser to
+ <filename>/usr/local/pgsql/doc/html/index.html</filename>, unless you
+ changed the installation directories.
+ </para>
+
+ <para>
+ The first few chapters of the main documentation are the Tutorial,
+ which should be your first reading if you are completely new to
+ <acronym>SQL</acronym> databases. If you are familiar with database
+ concepts then you want to proceed with part on server
+ administration, which contains information about how to set up
+ the database server, database users, and authentication.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Usually, you will want to modify your computer so that it will
+ automatically start the database server whenever it boots. Some
+ suggestions for this are in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Run the regression tests against the installed server (using
+ <command>make installcheck</command>). If you didn't run the
+ tests before installation, you should definitely do it now. This
+ is also explained in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ By default, <productname>PostgreSQL</productname> is configured to run on
+ minimal hardware. This allows it to start up with almost any
+ hardware configuration. The default configuration is, however,
+ not designed for optimum performance. To achieve optimum
+ performance, several server parameters must be adjusted, the two
+ most common being <varname>shared_buffers</varname> and
+ <varname>work_mem</varname>.
+ Other parameters mentioned in the documentation also affect
+ performance.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect1>
+
+ <xi:include href="postgres.sgml" xpointer="supported-platforms" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.sgml" xpointer="installation-platform-notes" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+</article>