首页 > 解决方案 > 为什么在安装过程中加密密钥在 Postgresql TDE 中不起作用?“从 encryption_key_command 收到的未知数据”

问题描述

我正在尝试从 Cyber​​tech ( https://www.cybertec-postgresql.com/ ) 安装 Postgresql TDE,特别是 9.6.12 版。

我遵循了默认安装的整个指南:

$ wget https://download.cybertec-postgresql.com/postgresql-9.6.12-tde.tar.gz
$ sudo apt-get install libreadline-dev zlibc zlib1g-dev bison flex libssl-dev openssl libperl-dev python-dev

我创建了一个包含以下内容的 shell /opt/pg_key.sh:

#!/bin/sh

回声 882fb7c12e80280fd664c69d2d636913

$ chmod +x /opt/pg_key.sh
$ tar xvfz postgresql-9.6.12-tde.tar.gz
$ cd postgresql-9.6.12-tde/
$ ./configure --prefix /usr/local/pgsql/ --with-openssl  --with-perl --with-python
$ sudo make install
$ cd contrib/
$ sudo make install
$ sudo chown user:user /usr/local/pgsql/data/
$ initdb -D /usr/local/pgsql/data/ -K /opt/pg_key.sh

我在最后一个命令中有一个错误:

The files belonging to this database system will be owned by user
"user". This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8". The
default text search configuration will be set to "english".
 
Data page checksums are disabled.
Data encryption is enabled. 
fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... FATAL:  Unknown data received from encryption_key_command
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/pgsql/data"

提前致谢

标签: postgresqlsecurityinstallationubuntu-16.04tde

解决方案


推荐阅读