I had postgres9.6 installed and working the other day but the version wasn't compatible.
I used YUM REMOVE to remove that one and then followed the instructions here https://www.postgresql.org/download/linux/redhat/ to install postgres10.
However anytime I do the
Initializing database ... mkdir: cannot create directory ‘/var/lib/pgsql’: Permission denied
Initializing database ... failed, see /var/lib/pgsql/10/initdb.log
However the log file is actually empty.
I've tried a number of things suggested with no success. Any advice would be great as to where to start looking about this