Pivotal Knowledge Base

Follow

How to install pgcrypto

Environment

Product Version
Pivotal Greenplum (GPDB) 4.3.x

Purpose

How to install pgcrypto?

Resolution

To install pgcrypto on your Greenplum Database cluster follow these instructions: 

  1. Download the supported pgcrypto executable for your database & Unix version from the product download website under the encryption sections. If you have trouble in understanding how to navigate the website, please have a look at the article.
  2. Once downloaded, copy the executable to the master host and make sure that the owner of the package is gpadmin.
[gpadmin@mdw tmp]$ ls -ltr | grep pgcrypto
-rw-r----- 1 gpadmin gpadmin 186051 Oct 14 11:03 pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg
[gpadmin@mdw tmp]
  1. Source the GPDB environment.
[gpadmin@mdw tmp]$ source /usr/local/greenplum-db/greenplum_path.sh
  1. Install the gppkg package using 
[gpadmin@mdw tmp]$ gppkg -i pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg
20151015:05:45:23:290075 gppkg:mdw:gpadmin-[INFO]:-Starting gppkg with args: -i pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg
20151015:05:45:24:290075 gppkg:mdw:gpadmin-[INFO]:-Installing package pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg
20151015:05:45:24:290075 gppkg:mdw:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/GP-4.3.5.1/.tmp/pgcrypto-1.2-2.x86_64.rpm --dbpath /usr/local/GP-4.3.5.1/share/packages/database --prefix /usr/local/GP-4.3.5.1'
20151015:05:45:25:290075 gppkg:mdw:gpadmin-[INFO]:-Installing pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg locally
20151015:05:45:25:290075 gppkg:mdw:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/GP-4.3.5.1/.tmp/pgcrypto-1.2-2.x86_64.rpm --dbpath /usr/local/GP-4.3.5.1/share/packages/database --prefix /usr/local/GP-4.3.5.1'
20151015:05:45:25:290075 gppkg:mdw:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -i /usr/local/GP-4.3.5.1/.tmp/pgcrypto-1.2-2.x86_64.rpm --dbpath /usr/local/GP-4.3.5.1/share/packages/database --prefix=/usr/local/GP-4.3.5.1'
20151015:05:45:25:290075 gppkg:mdw:gpadmin-[INFO]:-Completed local installation of pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg.
20151015:05:45:25:290075 gppkg:mdw:gpadmin-[INFO]:-Please run psql -d mydatabase -f $GPHOME/share/postgresql/contrib/pgcrypto.sql to enable the package.
20151015:05:45:25:290075 gppkg:mdw:gpadmin-[INFO]:-pgcrypto-ossv1.1_pv1.2_gpdb4.3orca-rhel5-x86_64.gppkg successfully installed.
  1. Once done you will then need to run the script $GPHOME/share/postgresql/contrib/pgcrypto.sql for the database you want to use pgcrypto on.

To do this run the following command:

psql -d <DBNAME> -f $GPHOME/share/postgresql/contrib/pgcrypto.sql 

Once this script is finished you can log in to the database and test pgcrypto.

Notes:
You will need to request the pgcrypto package from Greenplum Support. Greenplum Support does not support the pgcrypto package downloaded from the postgresql site.

For those on GPDB 5.x, the pgcrypto package is already shipped with with the main GPDB binaries so there is no need to download a separate package from the product download page. Installion instructions for 5.x can be found at: http://gpdb.docs.pivotal.io/500/install_guide/prep_os_install_gpdb.html#topic_sqb_bsw_2z

Comments

Powered by Zendesk