Installing the Greenplum Client Tools

    See the Greenplum Database Release Notes for the list of currently supported platforms for the Client Tools.

    Parent topic: Greenplum Database Client Tools for UNIX

    The Greenplum Database client tools installer installs the following client tools:

    • PostgreSQL Interactive Terminal (psql)
    • PostgreSQL Database Dump Utilities ( and pg_dumpall)
    1. Download the appropriate Greenplum Clients installer package for your platform from VMware Tanzu Network.

    2. Follow the instructions in to verify the integrity of the Greenplum Clients software.

    3. Unzip the installer:

    4. Run the installer:

    5. The installer will prompt you to accept the license agreement and to provide an installation path. For the installation path, be sure to enter an absolute path if you choose not to accept the default location (for example, /mydir/gp-client-tools). The default install location for the client tools is /usr/local/greenplum-clients-<version>

    About Your Installation

    Your Greenplum Database client tools installation contains the following files and directories:

    • bin — client command-line tools
    • ext — python dependencies
    • include — header files
    • lib — client tools library files
    • greenplum_clients_path.sh — environment variables

    As a convenience, a greenplum_clients_path.sh file is provided in your client tools installation directory following installation. It has the following environment variable settings:

    GPHOME_CLIENTS — The installation directory of the Greenplum Database client tools.

    PATH — Adds the path to the command-line utilities.

    LD_LIBRARY_PATH — The path to the library files.

    You can source this file in your user’s startup shell profile (such as .bashrc or .bash_profile).

    After editing the chosen profile file, source it as the correct user to make the changes active. For example:

    1. source ~/.bashrc

    The PostgreSQL command-line tools require several connection parameters in order to be able to connect to a Greenplum Database database. In order to save some typing on the command-line, you can create the following environment variables in your preferred profile file (such as .bashrc).

    • PGDATABASE — The name of the default Greenplum database to connect to.
    • PGHOST — The Greenplum master host name or IP address.
    • — The port number that the Greenplum master instance (postmaster process) is running on.
    • PGUSER — The default database role name to use for login.

    In order for Greenplum Database to be able to accept remote client connections, you must configure your Greenplum Database master so that connections are allowed from the client hosts and database users that will be connecting to Greenplum Database.

    To enable remote client connections

    1. Make sure that the pg_hba.conf file of the Greenplum Database master is correctly configured to allow connections from the users to the database(s) using the authentication method you want. For details, see “Editing the pg_hba.conf File” in the Greenplum Database Administration Guide, and also see the Greenplum Database Security Configuration Guide.

      Make sure the authentication method you choose is supported by the client tool you are using.

    2. Make sure that the databases and roles you are using to connect exist in the system and that the roles have the correct privileges to the database objects.

    If you use Kerberos authentication to connect to a Greenplum Database with the psql utility, your client system must be configured to use Kerberos authentication. If you are not using Kerberos authentication to connect to a Greenplum Database, Kerberos is not needed on your client system.

    For information about enabling Kerberos authentication with Greenplum Database, see the “Kerberos Authentication” chapter in the Greenplum Database Administrator Guide.

    The following are requirements to connect to a Greenplum Database that is enabled with Kerberos authentication from a client system with Greenplum Database client software.

    Prerequisites

    • Kerberos must be installed and configured on the Greenplum Database master host. See .

    • The client systems require the Kerberos configuration file krb5.conf from the Greenplum Database master.

    • The client systems require a Kerberos keytab file that contains the authentication credentials for the Greenplum Database user that is used to log into the database.

    • The client machines must be able to connect to Greenplum Database master host.

      On Linux systems, the hosts file is located in /etc.

    Required Software on the Client Machine

    The Kerberos kinit utility is required on the client machine. The kinit utility is available when you install the Kerberos packages:

    • krb5-libs
    • krb5-workstation

    Note: When you install the Kerberos packages, you can use other Kerberos utilities such as klist to display Kerberos ticket information.

    Setting Up a Client System with Kerberos Authentication

    To connect to Greenplum Database with Kerberos authentication requires a Kerberos ticket. On client systems, tickets are generated from Kerberos keytab files with the utility and are stored in a cache file.

    1. Install a copy of the Kerberos configuration file krb5.conf from the Greenplum Database master. The file is used by the Greenplum Database client software and the Kerberos utilities.

      Install krb5.conf in the /etc directory.

      If needed, add the parameter default_ccache_name to the [libdefaults] section of the krb5.ini file and specify the location of the Kerberos ticket cache file on the client system.

    2. Obtain a Kerberos keytab file that contains the authentication credentials for the Greenplum Database user.

    3. Run kinit specifying the keytab file to create a ticket on the client machine. For this example, the keytab file gpdb-kerberos.keytab is in the current directory. The ticket cache file is in the gpadmin user home directory. For example:

    From a remote system, you can access a Greenplum Database that has Kerberos authentication enabled.

    To connect to Greenplum Database with psql

    1. As the gpadmin user, open a command window.

    2. Start psql from the command window and specify a connection to the Greenplum Database specifying the user that is configured with Kerberos authentication.

      The following example logs into the Greenplum Database on the machine kerberos-gpdb as the gpadmin user with the Kerberos credentials gpadmin/kerberos-gpdb:

    Refer to the client tool reference documentation for further instructions:

    • Greenplum Command Line Tools — See .