pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target
Date: Wed, 18 Sep 2019 12:22:28 +0200 (CEST)
Message-ID: <VisenaEmail.55.62f2e86a7f8136a1.16d43e4b6f1@tc7-visena> (raw)
In-Reply-To: <CAFegzBSHJiiazfjBsNBd-jey9xrTSFrKQQQeAR1W7CZft-161A@mail.gmail.com>

På onsdag 18. september 2019 kl. 12:13:24, skrev Marco Ippolito <
ippolito.marco@gmail.com <mailto:ippolito.marco@gmail.com>>: Thanks Matthias. 
Followed these steps (indicated here:
https://www.postgresql.org/docs/11/creating-cluster.html 
<https://www.postgresql.org/docs/11/creating-cluster.html; )  root# chown 
postgres /usr/local/pgsql root# su postgres postgres$ initdb -D 
/usr/local/pgsql/data postgres@pc:/home/marco$ 
/usr/lib/postgresql/11/bin/initdb -D /usr/local/pgsql/data
 The files belonging to this database system will be owned by user "postgres".
 This user must also own the server process.

 The database cluster will be initialized with locales
 COLLATE: en_GB.UTF-8
 CTYPE: en_GB.UTF-8
 MESSAGES: en_GB.UTF-8
 MONETARY: C.UTF-8
 NUMERIC: C.UTF-8
 TIME: C.UTF-8
 The default database encoding has accordingly been set to "UTF8".
 The default text search configuration will be set to "english".

 Data page checksums are disabled.

 creating directory /usr/local/pgsql/data ... ok
 creating subdirectories ... ok
 selecting default max_connections ... 100
 selecting default shared_buffers ... 128MB
 selecting default timezone ... Europe/Rome
 selecting dynamic shared memory implementation ... posix
 creating configuration files ... ok
 running bootstrap script ... ok
 performing post-bootstrap initialization ... ok
 syncing data to disk ... ok

 WARNING: enabling "trust" authentication for local connections
 You can change this by editing pg_hba.conf or using the option -A, or
 --auth-local and --auth-host, the next time you run initdb.

 Success. You can now start the database server using:

 /usr/lib/postgresql/11/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start 
But now permission denied: postgres@pc:/home/marco$ sudo 
/usr/lib/postgresql/11/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
 [sudo] password for postgres:
 postgres is not in the sudoers file. This incident will be reported.
 postgres@pc:/home/marco$ /usr/lib/postgresql/11/bin/pg_ctl -D 
/usr/local/pgsql/data -l logfile start
 waiting for server to start..../bin/sh: 1: cannot create logfile: Permission 
denied
 stopped waiting
 pg_ctl: could not start server
 Examine the log output.
 postgres@pc:/home/marco$ Start pg_ctl as postgres user, no need to sudo. -- 
Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 
andreas@visena.com <mailto:andreas@visena.com> www.visena.com 
<https://www.visena.com;  <https://www.visena.com;

view thread (13+ messages)  latest in thread

Message-ID: <VisenaEmail.55.62f2e86a7f8136a1.16d43e4b6f1@tc7-visena>
Permalink:  ../VisenaEmail.55.62f2e86a7f8136a1.16d43e4b6f1@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.55.62f2e86a7f8136a1.16d43e4b6f1@tc7-visena

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@visena.com
  Subject: Re: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target
  In-Reply-To: <VisenaEmail.55.62f2e86a7f8136a1.16d43e4b6f1@tc7-visena>
  References: <CAFegzBSHJiiazfjBsNBd-jey9xrTSFrKQQQeAR1W7CZft-161A@mail.gmail.com> <VisenaEmail.55.62f2e86a7f8136a1.16d43e4b6f1@tc7-visena>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox