initdb is failing on Centos 7 with 10.4 because the install procedure doesnot change the ownership of the /usr/local/pgsql directory to postgres.
Changing the ownership fixes the problem, but the install procedure shoulddo this.--Mike Nolan