glfs/content/databases/postgresql/postgresql-exp.xml
Igor Živković 458342f025 s/postgres/postgresql/ where appropriate
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1330 af4574ff-66df-0310-9fd7-8a98e5e911e0
2003-10-06 09:07:10 +00:00

19 lines
878 B
XML

<sect2>
<title>Command explanations</title>
<para><command>useradd -d /var/pgsql/data postgres</command>: Add an unprivileged user to run the database server. Running the
server as root is dangerous, and moreover simply will not work.</para>
<para><command>su - postgres -c '/usr/bin/initdb -D /var/pgsql/data'</command>: Initialize the database tablespace. This command may not be executed
by root.</para>
<para><command>su - postgres -c '/usr/bin/postmaster -D /var/pgsql/data >
/var/pgsql/data/logfile 2>&amp;1 &amp;'</command>: Start the database server. User postgres must execute this command as well.</para>
<para><command>createdb test, create table t1 , insert into t1 values..., select *
from t1</command>: Create a database, add a table to it, insert some rows into the table
and select them to verify that the installation is working
properly.</para>
</sect2>