aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-02-02 13:23:26 +0900
committerMichael Paquier <michael@paquier.xyz>2019-02-02 13:23:26 +0900
commit3e938a83b2ee3b47d47cdbdf58df09946877d4fd (patch)
treed4b9fbcdb37666e9fc38a83a0608a7aa86ae5cce /doc/src
parent558d77f20e4e9ed18101d5d057b770ae22ece855 (diff)
downloadpostgresql-3e938a83b2ee3b47d47cdbdf58df09946877d4fd.tar.gz
postgresql-3e938a83b2ee3b47d47cdbdf58df09946877d4fd.zip
Improve installation instructions with pg_ctl in documentation
The documentation includes sections to be able to initialize and start Postgres via a couple of commands. Some of its recommendations involve using directly "postgres", which is inconsistent with the recommendation given by initdb. At the same time make some other command calls more consistent with the rest, by using an absolute path when creating a database. Author: Andreas Scherbaum Reviewed-by: Michael Banck, Ryan Lambert
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/installation.sgml2
-rw-r--r--doc/src/sgml/standalone-install.xml12
2 files changed, 5 insertions, 9 deletions
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index ee518fb9b6b..449386243b2 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -37,7 +37,7 @@ mkdir /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/postgres -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;
+/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>
diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml
index 62582effed2..f584789f9a4 100644
--- a/doc/src/sgml/standalone-install.xml
+++ b/doc/src/sgml/standalone-install.xml
@@ -77,25 +77,21 @@ postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</useri
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/postgres -D /usr/local/pgsql/data</programlisting>
- This will start the server in the foreground. To put the server
- in the background use something like:
-<programlisting>nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
- &lt;/dev/null &gt;&gt;server.log 2&gt;&amp;1 &lt;/dev/null &amp;</programlisting>
+<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>kill `cat /usr/local/pgsql/data/postmaster.pid`</programlisting>
+<programlisting>/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop</programlisting>
</para>
</step>
<step>
<para>
Create a database:
-<screen><userinput>createdb testdb</userinput></screen>
+<screen><userinput>/usr/local/pgsql/bin/createdb testdb</userinput></screen>
Then enter:
-<screen><userinput>psql testdb</userinput></screen>
+<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>