pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
initdb failing (10.4 centos7)
11+ messages / 4 participants
[nested] [flat]

* initdb failing (10.4 centos7)
@ 2018-05-19 19:10 Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:15 ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  0 siblings, 2 replies; 11+ messages in thread

From: Michael Nolan @ 2018-05-19 19:10 UTC (permalink / raw)
  To: pgsql-general

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.
--
Mike Nolan

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
@ 2018-05-19 19:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 11+ messages in thread

From: Adrian Klaver @ 2018-05-19 19:15 UTC (permalink / raw)
  To: Michael Nolan <htfoot@gmail.com>; pgsql-general

On 05/19/2018 12:10 PM, Michael Nolan 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.

Did you follow the below?:

https://www.postgresql.org/download/linux/redhat/
"
For RHEL / CentOS / SL / OL 7 or Fedora 27 and later derived distributions:

   postgresql-setup initdb
   systemctl enable postgresql.service
   systemctl start postgresql.service
"

If you did, what user did you do it as?


> --
> Mike Nolan


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
@ 2018-05-19 19:16 ` Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  1 sibling, 1 reply; 11+ messages in thread

From: Don Seiler @ 2018-05-19 19:16 UTC (permalink / raw)
  To: Michael Nolan <htfoot@gmail.com>; +Cc: pgsql-general

On Sat, May 19, 2018 at 2:10 PM, Michael Nolan <htfoot@gmail.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

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
@ 2018-05-19 22:16   ` Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:23     ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Michael Nolan @ 2018-05-19 22:16 UTC (permalink / raw)
  To: Don Seiler <don@seiler.us>; +Cc: pgsql-general

On Sat, May 19, 2018 at 2:16 PM, Don Seiler <don@seiler.us> wrote:

> On Sat, May 19, 2018 at 2:10 PM, Michael Nolan <htfoot@gmail.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
>

I was installing from source code, so I did a configure and a build (as
postgres) and then an install (as root).
--
Mike Nolan

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
@ 2018-05-19 22:23     ` Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 22:44       ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Adrian Klaver @ 2018-05-19 22:23 UTC (permalink / raw)
  To: Michael Nolan <htfoot@gmail.com>; Don Seiler <don@seiler.us>; +Cc: pgsql-general

On 05/19/2018 03:16 PM, Michael Nolan wrote:
> 
> 
> On Sat, May 19, 2018 at 2:16 PM, Don Seiler <don@seiler.us 
> <mailto:don@seiler.us>> wrote:
> 
>     On Sat, May 19, 2018 at 2:10 PM, Michael Nolan <htfoot@gmail.com
>     <mailto:htfoot@gmail.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;
> 
> 
> 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


> --
> Mike Nolan


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:23     ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-05-19 22:44       ` Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:50         ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 22:53         ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 11+ messages in thread

From: Michael Nolan @ 2018-05-19 22:44 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Don Seiler <don@seiler.us>; pgsql-general

On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

> On 05/19/2018 03:16 PM, Michael Nolan wrote:
>
>>
>>
>> On Sat, May 19, 2018 at 2:16 PM, Don Seiler <don@seiler.us <mailto:
>> don@seiler.us>> wrote:
>>
>>     On Sat, May 19, 2018 at 2:10 PM, Michael Nolan <htfoot@gmail.com
>>     <mailto:htfoot@gmail.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;
>>
>>
>> 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
>
>
Shouldn't this also be mentioned in the INSTALL file in the source
directory then?
--
Mike Nolan

>
>
> --
>> Mike Nolan
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:23     ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 22:44       ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
@ 2018-05-19 22:50         ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 11+ messages in thread

From: Adrian Klaver @ 2018-05-19 22:50 UTC (permalink / raw)
  To: Michael Nolan <htfoot@gmail.com>; +Cc: Don Seiler <don@seiler.us>; pgsql-general

On 05/19/2018 03:44 PM, Michael Nolan wrote:
> 
> 
> On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver 
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 05/19/2018 03:16 PM, Michael Nolan wrote:
> 
> 
> 
>         On Sat, May 19, 2018 at 2:16 PM, Don Seiler <don@seiler.us
>         <mailto:don@seiler.us> <mailto:don@seiler.us
>         <mailto:don@seiler.us>>> wrote:
> 
>              On Sat, May 19, 2018 at 2:10 PM, Michael Nolan
>         <htfoot@gmail.com <mailto:htfoot@gmail.com>
>              <mailto:htfoot@gmail.com <mailto:htfoot@gmail.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.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:23     ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 22:44       ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
@ 2018-05-19 22:53         ` Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 23:06           ` initdb failing (10.4 centos7) David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 1 reply; 11+ messages in thread

From: Adrian Klaver @ 2018-05-19 22:53 UTC (permalink / raw)
  To: Michael Nolan <htfoot@gmail.com>; +Cc: Don Seiler <don@seiler.us>; pgsql-general

On 05/19/2018 03:44 PM, Michael Nolan wrote:
> 
> 
> On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver 
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
> 

> 
>     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?

It is also in the Getting Started portion of INSTALL.

> --
> Mike Nolan
> 
> 
> 
>         --
>         Mike Nolan
> 
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:23     ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 22:44       ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:53         ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-05-19 23:06           ` David G. Johnston <david.g.johnston@gmail.com>
  2018-05-19 23:11             ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 11+ messages in thread

From: David G. Johnston @ 2018-05-19 23:06 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Michael Nolan <htfoot@gmail.com>; Don Seiler <don@seiler.us>; pgsql-general

On Saturday, May 19, 2018, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

> On 05/19/2018 03:44 PM, Michael Nolan wrote:
>
>>
>>
>> On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver <adrian.klaver@aklaver.com
>> <mailto:adrian.klaver@aklaver.com>> wrote:
>>
>>
>
>>     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?
>>
>
> It is also in the Getting Started portion of INSTALL.


IIUC the INSTALL file is simply an artifact of the build process for which
the doc sgml file is the source so they should indeed match.

While practically speaking one must initdb at least once after installation
in order for the product to be useful initdb is itself not really part of
the core installation routine.  IOW it is outside of what the make routine
is responsible for and, as documented, it doesn't deal with permissions
explicitly nor does it create parent directories.

David J.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
  2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 19:16 ` Re: initdb failing (10.4 centos7) Don Seiler <don@seiler.us>
  2018-05-19 22:16   ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:23     ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 22:44       ` Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
  2018-05-19 22:53         ` Re: initdb failing (10.4 centos7) Adrian Klaver <adrian.klaver@aklaver.com>
  2018-05-19 23:06           ` initdb failing (10.4 centos7) David G. Johnston <david.g.johnston@gmail.com>
@ 2018-05-19 23:11             ` Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 11+ messages in thread

From: Adrian Klaver @ 2018-05-19 23:11 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Michael Nolan <htfoot@gmail.com>; Don Seiler <don@seiler.us>; pgsql-general

On 05/19/2018 04:06 PM, David G. Johnston wrote:
> On Saturday, May 19, 2018, Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 05/19/2018 03:44 PM, Michael Nolan wrote:
> 
> 
> 
>         On Sat, May 19, 2018 at 5:23 PM, Adrian Klaver
>         <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>> wrote:
> 
> 
> 
>              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;
>             
>         <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?
> 
> 
>     It is also in the Getting Started portion of INSTALL. 
> 
> 
> IIUC the INSTALL file is simply an artifact of the build process for 
> which the doc sgml file is the source so they should indeed match.

They are close but they do not match, there is no Getting Started 
section in the Installation portion of the Web docs:

https://www.postgresql.org/docs/10/static/installation.html

> 
> While practically speaking one must initdb at least once after 
> installation in order for the product to be useful initdb is itself not 
> really part of the core installation routine.  IOW it is outside of what 
> the make routine is responsible for and, as documented, it doesn't deal 
> with permissions explicitly nor does it create parent directories.
> 
> David J.


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: initdb failing (10.4 centos7)
@ 2018-05-19 23:56 Michael Nolan <htfoot@gmail.com>
  0 siblings, 0 replies; 11+ messages in thread

From: Michael Nolan @ 2018-05-19 23:56 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; Don Seiler <don@seiler.us>; pgsql-general

Just call me blind!
--
Mike Nolan

^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2018-05-19 23:56 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-05-19 19:10 initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>
2018-05-19 19:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-19 19:16 ` Don Seiler <don@seiler.us>
2018-05-19 22:16   ` Michael Nolan <htfoot@gmail.com>
2018-05-19 22:23     ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-19 22:44       ` Michael Nolan <htfoot@gmail.com>
2018-05-19 22:50         ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-19 22:53         ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-19 23:06           ` David G. Johnston <david.g.johnston@gmail.com>
2018-05-19 23:11             ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-05-19 23:56 Re: initdb failing (10.4 centos7) Michael Nolan <htfoot@gmail.com>

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