Re: initdb can't init the database

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: initdb can't init the database
Дата
Msg-id CAB8KJ=jaGAwYD6=_WTZFOoDPboEre3Kx4kCxS6bhgyU0f_PyCQ@mail.gmail.com
обсуждение исходный текст
Ответ на initdb can't init the database  ("Wen Yi" <896634148@qq.com>)
Ответы Re: initdb can't init the database
Список pgsql-general
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
eitherthe 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



В списке pgsql-general по дате отправления:

Предыдущее
От: "Wen Yi"
Дата:
Сообщение: initdb can't init the database
Следующее
От: "Wen Yi"
Дата:
Сообщение: Re: initdb can't init the database