Installing EDB Postgres AI for WarehousePG v7.4
WarehousePG software is a downloadable package that you install on each host system using your operating system's package management system. You must install WarehousePG on each host machine of the WarehousePG cluster.
Perform the following tasks in order:
Note
Starting from WarehousePG 7.4, the default installation directory is /usr/edb/whpg7. For backward compatibility, symlinks are provided at /usr/local/greenplum-db and /usr/local/greenplum-db-clients.
Before you begin installing WarehousePG, be sure you have completed the steps in Configure operating system to configure each of the coordinator, standby coordinator, and segment host machines for WarehousePG.
Important
You require sudo or root user access to install from a pre-built RPM file.
Installing EDB Postgres AI for WarehousePG
To install, you will need an EDB Subscription Token. This token is available, once logged in with your EDB account from the EDB repositories.
Save the EDB Subscription token in an environment variable:
export EDB_SUBSCRIPTION_TOKEN=<your-token>
Run the following command to add the EDB repository to your system:
curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/gpsupp/setup.rpm.sh" | sudo -E bash
Important
Starting with WarehousePG 7.4, the warehouse-pg-7-clients package is mandatory and must be installed alongside the server package.
Install the EPEL repository and Warehouse-pg packages according to your operating system:
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo dnf install -y warehouse-pg-7 warehouse-pg-7-clients
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm sudo dnf install -y warehouse-pg-7 warehouse-pg-7-clients
Change the owner and group of the installed files to gpadmin:
sudo chown -R gpadmin:gpadmin /usr/edb/whpg*
Enabling passwordless SSH
The gpadmin user on each WarehousePG host must be able to connect from any host in the cluster to any other host in the cluster without entering a password or passphrase (called "passwordless SSH"). If you enable passwordless SSH from the coordinator host to every other host in the cluster ("1-n passwordless SSH"), you can use the WarehousePG gpssh-exkeys command-line utility to enable passwordless SSH from every host to every other host ("n-n passwordless SSH").
Log in to the coordinator host as the
gpadminuser.Source the
pathfile in the WarehousePG installation directory.source /usr/edb/whpg7/greenplum_path.sh source /usr/edb/whpg7/greenplum_clients_path.sh
Note
Add the above
sourcecommand to thegpadminuser's.bashrcor other shell startup file so that the WarehousePG path and environment variables are set whenever you log in asgpadmin.Use the
ssh-copy-idcommand to add thegpadminuser's public key to theauthorized_hostsSSH file on every other host in the cluster.ssh-copy-id scdw ssh-copy-id sdw1 ssh-copy-id sdw2 ssh-copy-id sdw3 . . .
This enables 1-n passwordless SSH. You will be prompted to enter the
gpadminuser's password for each host. If you have thesshpasscommand on your system, you can use a command like the following to avoid the prompt.SSHPASS=<password> sshpass -e ssh-copy-id scdw
In the
gpadminhome directory, create a file namedhostfile_exkeysthat has the machine configured host names and host addresses (interface names) for each host in your WarehousePG cluster (coordinator, standby coordinator, and segment hosts). Make sure there are no blank lines or extra spaces. Check the/etc/hostsfile on your systems for the correct host names to use for your environment. For example, if you have a coordinator, standby coordinator, and three segment hosts with two unbonded network interfaces per host, your file would look something like this:cdw cdw-1 cdw-2 scdw scdw-1 scdw-2 sdw1 sdw1-1 sdw1-2 sdw2 sdw2-1 sdw2-2 sdw3 sdw3-1 sdw3-2
Run the
gpssh-exkeysutility with yourhostfile_exkeysfile to enable n-n passwordless SSH for thegpadminuser.gpssh-exkeys -f hostfile_exkeys
Verifying your installation
To make sure the WarehousePG software was installed and configured correctly, run the following confirmation steps from your WarehousePG coordinator host. If necessary, correct any problems before continuing on to the next task.
Log in to the coordinator host as
gpadmin:su - gpadminUse the
gpsshutility to see if you can log in to all hosts without a password prompt, and to confirm that the WarehousePG software was installed on all hosts. Use thehostfile_exkeysfile you used to set up passwordless SSH. For example:gpssh -f hostfile_exkeys -e 'ls -l /usr/edb/whpg7'
If the installation was successful, you should be able to log in to all hosts without a password prompt. All hosts should show that they have the same contents in their installation directories, and that the directories are owned by the
gpadminuser.If you are prompted for a password, run the following command to redo the ssh key exchange:
gpssh-exkeys -f hostfile_exkeys
WarehousePG installation files and directories
The following files and directories are included with your WarehousePG installation:
greenplum_path.sh— This file contains the environment variables for WarehousePG. See Setting WarehousePG environment variables.- bin — This directory contains the WarehousePG management utilities. This directory also contains the PostgreSQL client and server programs, most of which are also used in WarehousePG.
- docs/cli_help — This directory contains help files for WarehousePG command-line utilities.
- docs/cli_help/gpconfigs — This directory contains sample
gpinitsystemconfiguration files and host files that can be modified and used when installing and initializing WarehousePG. - ext — Bundled programs (such as Python) used by some WarehousePG utilities.
- include — The C header files for WarehousePG.
- lib — WarehousePG and PostgreSQL library files.
- sbin — Supporting/Internal scripts and programs.
- share — Shared files for WarehousePG.
Next steps
Perform the following steps once your installation of WarehousePG is complete: