Whenerver I start PostgreSQL using command:
$ sudo /etc/init.d/postgresql start
Pg doesn\'t start up. The error reported is:
How about not to hard copying the Server Key and leaving it where and like it is.
Instead it is simplier to:
Change the "server.key" link Permissions in PostgreSQL Data Directory (its the Location where the Link to the private certificate.key File resides)
# cd /var/lib/postgresql/9.1/main/
to
# chown -R postgres:postgres server.key`
And make sure that the original Certificate in
# /etc/ssl/private/ssl-cert-snakeoil.key
has those Properties, by Setting them
# chmod 640 ssl-cert-snakeoil.key
# chown root:ssl-cert ssl-cert-snakeoil.key
This Solution has been tested on Debian. Please remember that CentOS can use the SELinux with extended User Rights Management, which can be viewed by
# ls -laZ *