我无法启动新安装的postgre,即9.4.5。请参阅下面的错误。
root @ 0f51e9aa2afc:/ actinbox #service postgresql start *正在启动 PostgreSQL 9.4数据库服务器
* PostgreSQL服务器无法启动。请检查日志输出:LOG:跳过丢失的配置文件 “/var/lib/postgresql/9.4/main/postgresql.auto.conf”2015-12-02 07:14:48 UTC [312-2]致命:无法访问私钥文件 “/etc/ssl/private/ssl-cert-snakeoil.key”:权限被拒绝
我在我的守护进程中使用ubuntu 14.04.3 LTS。谁可以帮助我?
答案 0 :(得分:0)
试试这些:
sudo chown postgres /etc/ssl/private/ssl-cert-snakeoil.key
sudo chown postgres /etc/ssl/certs/ssl-cert-snakeoil.pem
如果它不起作用,请尝试以下方法:
(as root)
# go to PGDATA directory
cd /var/lib/postgresql/9.1/main
ls -l server.crt server.key
# confirm both of those files are symbolic links
# to files in /etc/ssl before going further
# remove symlinks to SSL certs
rm server.crt
rm server.key
# copy the SSL certs to the local directory
cp /etc/ssl/certs/ssl-cert-snakeoil.pem server.crt
cp /etc/ssl/private/ssl-cert-snakeoil.key server.key
# set permissions on ssl certs
# and postgres ownership on everything else
# just in case
chown postgres *
chmod 640 server.crt server.key
service postgresql start