title: Unable to start postgresql service on CentOS 7
body: <p>Unable to start postgresql-9.5 on CentOS 7. </p>
  
  <p>I followed this page - <a href="https://wiki.postgresql.org/wiki/YUM_Installation" rel="noreferrer">https://wiki.postgresql.org/wiki/YUM_Installation</a> - for installing the database server on CentOS.</p>
  
  <p>I tried the same after setting <code>setenforce 0</code>, and that did not help either.</p>
  
  <p>I am doing all operations as <code>root</code>.</p>
  
  <pre><code>systemctl start postgresql-9.5.service
  Job for postgresql-9.5.service failed because the control process exited with error 
  code. See "systemctl status postgresql-9.5.service" and "journalctl -xe" for details.
  </code></pre>
  
  <p>And here is what I get for status - </p>
  
  <pre><code>Redirecting to /bin/systemctl status  postgresql-9.5.service
  ● postgresql-9.5.service - PostgreSQL 9.5 database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql-9.5.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2016-02-18 15:20:30 EST; 2min 28s ago
    Process: 15041 ExecStartPre=/usr/pgsql-9.5/bin/postgresql95-check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
  
  Feb 18 15:20:30 myserver systemd[1]: Starting PostgreSQL 9.5 database server...
  Feb 18 15:20:30 myserver systemd[1]: postgresql-9.5.service: control process exited, code=exited status=1
  Feb 18 15:20:30 myserver systemd[1]: Failed to start PostgreSQL 9.5 database server.
  Feb 18 15:20:30 myserver systemd[1]: Unit postgresql-9.5.service entered failed state.
  Feb 18 15:20:30 myserver systemd[1]: postgresql-9.5.service failed.
  </code></pre>
  
  <p>And the contents of the different conf files are as follows - </p>
  
  <pre><code>[root@myserver /]# cat /etc/ld.so.conf.d/postgresql-pgdg-libs.conf
  /usr/pgsql-9.5/lib/
  
  [root@myserver /]# cat /usr/lib/tmpfiles.d/postgresql-9.5.conf
  d /var/run/postgresql 0755 postgres postgres -
  
  [root@myserver /]# cat /usr/pgsql-9.5/share/postgresql-9.5-libs.conf
  /usr/pgsql-9.5/lib/
  
  [root@myserver /]# cat /etc/alternatives/pgsql-ld-conf
  /usr/pgsql-9.5/lib/
  
  [root@myserver /]# cat /var/lib/alternatives/pgsql-ld-conf
  auto
  /etc/ld.so.conf.d/postgresql-pgdg-libs.conf
  
  /usr/pgsql-9.5/share/postgresql-9.5-libs.conf
  950
  </code></pre>
  
  <p>Googled for the error that I am seeing.
  A number of folks have seen the same error, and the underlying cause is different in each case. Reading through those posts, it is not clear that I am seeing any of the already reported causes.</p>