The following bug has been logged on the website:
Bug reference: 14083
Logged by: Ian
Email address: porjo38(at)yahoo(dot)com(dot)au
PostgreSQL version: 9.5.2
Operating system: Centos7
Description:
# /usr/pgsql-9.5/bin/postgresql95-setup initdb
Failed to get D-Bus connection: Operation not permitted
failed to find PGDATA setting in postgresql-9.5.service
If I comment out the lines from 'postgresql95-setup' that call 'systemctl',
initdb executes succesfully.
I'm using RPM packages from http://yum.postgresql.org/:
# rpm -qa | grep postgres
postgresql95-libs-9.5.2-1PGDG.rhel7.x86_64
postgresql95-9.5.2-1PGDG.rhel7.x86_64
postgresql95-server-9.5.2-1PGDG.rhel7.x86_64