Re: initdb failing (10.4 centos7)

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Michael Nolan <htfoot(at)gmail(dot)com>
Cc: Don Seiler <don(at)seiler(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: initdb failing (10.4 centos7)
Date: 2018-05-19 22:50:31
Message-ID: 9e26b03f-0f88-0503-5d76-3e359100e564@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/19/2018 03:44 PM, Michael Nolan wrote:
>
>
> On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 05/19/2018 03:16 PM, Michael Nolan wrote:
>
>
>
> On Sat, May 19, 2018 at 2:16 PM, Don Seiler <don(at)seiler(dot)us
> <mailto:don(at)seiler(dot)us> <mailto:don(at)seiler(dot)us
> <mailto:don(at)seiler(dot)us>>> wrote:
>
>     On Sat, May 19, 2018 at 2:10 PM, Michael Nolan
> <htfoot(at)gmail(dot)com <mailto:htfoot(at)gmail(dot)com>
>     <mailto:htfoot(at)gmail(dot)com <mailto:htfoot(at)gmail(dot)com>>> wrote:
>
>         initdb is failing on Centos 7 with 10.4 because the install
>         procedure does not change the ownership of the
> /usr/local/pgsql
>         directory to postgres.
>
>         Changing the ownership fixes the problem, but the install
>         procedure should do this.
>
>
>     Are you using the PGDG repo packages, or the default CentOS
> repo
>     packages? You should use PGDG and those should install under
>     /var/lib/pgsql.
>
>     Don.
>     --     Don Seiler
> www.seiler.us <http://www.seiler.us> <http://www.seiler.us>
>
>
> I was installing from source code, so I did a configure and a
> build (as postgres) and then an install (as root).
>
>
> Then setting up the $DATADIR is on you:
>
> https://www.postgresql.org/docs/10/static/install-short.html
> <https://www.postgresql.org/docs/10/static/install-short.html>
>
>
> Shouldn't this also be mentioned in the INSTALL file in the source
> directory then?

In the INSTALL file that came with the 10.4 version I downloaded it is:

head -n 30 INSTALL

PostgreSQL Installation from Source Code


This document describes the installation of PostgreSQL using the
source

code distribution. (If you are installing a pre-packaged
distribution,

such as an RPM or Debian package, ignore this document and read the

packager's instructions instead.)

__________________________________________________________________


Short Version


./configure

make

su

make install

adduser postgres
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 >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

The long version is the rest of this document.
__________________________________________________________________

Requirements

In general, a modern Unix-compatible platform should be able to run
PostgreSQL. The platforms that had received specific testing at the

...

Setting up $DATADIR is left up to the user as it a matter of choice for
where you want to locate it.

> --
> Mike Nolan
>
>
>
> --
> Mike Nolan
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-05-19 22:53:17 Re: initdb failing (10.4 centos7)
Previous Message Michael Nolan 2018-05-19 22:44:38 Re: initdb failing (10.4 centos7)