pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wen Yi <896634148@qq.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: initdb can't init the database
Date: Sat, 10 Jun 2023 16:40:33 +0800
Message-ID: <tencent_D086A4035C98EA4057074C952003E2BADD09@qq.com> (raw)
In-Reply-To: <CAB8KJ=jaGAwYD6=_WTZFOoDPboEre3Kx4kCxS6bhgyU0f_PyCQ@mail.gmail.com>
References: <tencent_909734B08B5E9DD86A9B6912644CDCB41B06@qq.com>
	<CAB8KJ=jaGAwYD6=_WTZFOoDPboEre3Kx4kCxS6bhgyU0f_PyCQ@mail.gmail.com>

OK. I find where the problem is, thanks very much!


Yours,
Wen Yi



------------------ Original ------------------
From:                                                                                                                        "Ian Lawrence Barwick"                                                                                    <barwick@gmail.com>;
Date: Sat, Jun 10, 2023 01:54 PM
To: "Wen Yi"<896634148@qq.com>;
Cc: "pgsql-general"<pgsql-general@lists.postgresql.org>;
Subject: Re: initdb can't init the database



2023年6月10日(土) 14:30 Wen Yi <896634148@qq.com>:
>
> Hi team,
> I use the source to install the postgresql 15.3 (Fedora Linux 37), I create a install.sh as this:
>
> install.sh:
>
> sudo rm -r /home/postgres/pgsql
> sudo mkdir /home/postgres/pgsql
> sudo rm -r /home/postgres/pgsql/lib
> sudo mkdir /home/postgres/pgsql/lib
> ./configure --prefix=/home/postgres/pgsql/bin --exec-prefix=/home/postgres/pgsql/lib --enable-debug --enable-coverage --enable-dtrace --enable-cassert --enable-profiling
> sudo make install
> sudo useradd -m postgres
> sudo passwd -d postgres
> make clean
>
> Then, I start to execute this shell script:
>
>
> [beginnerc@bogon postgresql-15.3]$ ./install.sh
> [sudo] beginnerc's passwod:
> ...
> [beginnerc@bogon postgresql-15.3]$ su postgres
> bash-5.1$ ./initdb
> initdb: error: no data directory specified
> initdb: hint: You must identify the directory where the data for this database system will reside.  Do this with either the invocation option -D or the environment variable PGDATA.
(...)
> Can someone give me some advice?
> Thanks in advance!

The clue is right there after you execute initdb.

You also might want to check the ownership of those directories being created
by the script.

Regards

Ian Barwick

view thread (3+ messages)

Message-ID: <tencent_D086A4035C98EA4057074C952003E2BADD09@qq.com>
Permalink:  ../tencent_D086A4035C98EA4057074C952003E2BADD09@qq.com/
Also on:    postgresql.org/message-id/tencent_D086A4035C98EA4057074C952003E2BADD09@qq.com

 · 

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: 896634148@qq.com
  Subject: Re: initdb can't init the database
  In-Reply-To: <tencent_D086A4035C98EA4057074C952003E2BADD09@qq.com>
  References: <tencent_909734B08B5E9DD86A9B6912644CDCB41B06@qq.com> <CAB8KJ=jaGAwYD6=_WTZFOoDPboEre3Kx4kCxS6bhgyU0f_PyCQ@mail.gmail.com> <tencent_D086A4035C98EA4057074C952003E2BADD09@qq.com>

* 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