在 Windows Server 2012 中的 postgresql.conf 中更改 ssl = on 后,我无法 运行 postgresql 服务器。
I can't run postgresql server after I change ssl = on in postgresql.conf in Windows Server 2012.
在 postgresql.conf 中更改 ssl = on 后,postgresql 服务器无法再 运行。启用 SSL 还需要哪些设置。我在 Windows Server 2012.
上使用 postgresql
这是我的研究
https://www.postgresql.org/docs/current/static/ssl-tcp.html#SSL-FILE-USAGE
与link一样,您需要先创建一个自签名证书。
为此,您需要 OPENSSL。我使用 apache 2.4.12,它有 OpenSSL 1.01.1m ver.
您也可以从互联网上轻松下载和安装。
然后从cmd进入Openssl安装的文件夹。就我而言,"cd C:\Program Files\Apache Software Foundation\Apache 24\bin".
然后执行上面link说的命令。
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
openssl req -x509 -in server.req -text -key server.key -out server.crt (在 Windows OS 你只能做这些步骤.)
然后复制 server.key C:\(任何你想要的地方..)
复制server.crt C:\
查找您复制的文件 (server.key & server.crt) 并将它们复制到 PostgreSQL 数据文件夹。
然后在 postgresql.conf 文件中更改 ssl = on。
重新启动 postgresql 服务。
完成!!!
在 postgresql.conf 中更改 ssl = on 后,postgresql 服务器无法再 运行。启用 SSL 还需要哪些设置。我在 Windows Server 2012.
上使用 postgresql这是我的研究 https://www.postgresql.org/docs/current/static/ssl-tcp.html#SSL-FILE-USAGE
与link一样,您需要先创建一个自签名证书。
为此,您需要 OPENSSL。我使用 apache 2.4.12,它有 OpenSSL 1.01.1m ver.
您也可以从互联网上轻松下载和安装。
然后从cmd进入Openssl安装的文件夹。就我而言,"cd C:\Program Files\Apache Software Foundation\Apache 24\bin".
然后执行上面link说的命令。
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
openssl req -x509 -in server.req -text -key server.key -out server.crt (在 Windows OS 你只能做这些步骤.)
然后复制 server.key C:\(任何你想要的地方..)
复制server.crt C:\
查找您复制的文件 (server.key & server.crt) 并将它们复制到 PostgreSQL 数据文件夹。
然后在 postgresql.conf 文件中更改 ssl = on。
重新启动 postgresql 服务。
完成!!!