Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 14 additions & 36 deletions SOURCES/INSTALL-NOTE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,26 @@ Installation instructions for Transparent Data Encryption for PostgreSQL Free Ed

Requirements
============
1. PostgreSQL 9.3 Source Code
2. PostgreSQL 9.3 with psql installed
1. PostgreSQL 9.3/9.4/9.5 server, client, contrib and libraries.

Installation and Configuration
==============================
1. Setting environment variables
$ export PGSRC = #path of PostgreSQL source code
$ export PGHOME = #path of PostgreSQL installed
$ export TDEHOME = #path of pgTDE downloaded
$ export PGHOME=/path/to/pgsql
$ export PATH=$PGHOME/bin:$PATH
$ export PGDATA=/path/to/your/pgdata

2. Install pgcrypto from source code
# If you have already installed pgcrypto, you can skip this section.
$ cd $PGSRC/contrib/pgcrypto
$ gmake
$ gmake install
$ pg_ctl start
$ psql << EOF
> CREATE EXTENSION pgcrypto;
> EOF
2. Install the pgcrypo extension.
$ psql -c 'CREATE EXTENSION pgcrypto' mydb

3. Building pgTDE
$ sudo ln -s $PGHOME/lib/pgcrypto.so /usr/lib64/libpgcrypto.so
$ cd $PGSRC
$ ./configure
$ cd $TDEHOME/SOURCES/data_encryption
$ sh makedencryption.sh 93 $PGSRC
$ cd /path/to/tdeforpg/SOURCES
$ make USE_PGXS=1 all

4. install pgTDE to PostgreSQL
$ sudo ln -s $TDEHOME/SOURCES/data_encryption/93/data_encryption93.so /usr/lib64/data_encryption.so
$ vim $PGDATA/postgresql.conf # add shared_preload_libraries to postgresql.conf
shared_preload_libraries='/usr/lib64/data_encryption.so'
$ pg_ctl restart
$ cd $TDEHOME/SOURCES
$ sh bin/cipher_setup.sh $PGHOME
Transparent data encryption feature setup script
Please select from the setup menu below
Transparent data encryption feature setup menu
1: activate the transparent data encryption feature
2: inactivate the transparent data encryption feature
select menu [1 - 2] > 1
Please enter database server port to connect : <port_number>
Please enter database user name to connect : <user_name>
Please enter password for authentication : <password>
Please enter database name to connect : <db_name>

$ cd /path/to/tdeforpg/SOURCES
$ sudo make USE_PGXS=1 install
$ vim $PGDATA/postgresql.conf # enable data_encryption.so in shared_preload_libraries.
shared_preload_libraries = 'data_encryption.so'
$ pg_ctl -D $PGDATA restart
$ psql -c 'CREATE EXTENSION data_encryption' mydb
Loading