• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. User Guide
  4. FAQs
  5. Connection and Access FAQs
  6. How Can I Install the PostgreSQL Client?

How Can I Install the PostgreSQL Client?

PostgreSQL provides client installation packages and the required dynamic shared library packages for different OSs on its official website. Click here to obtain the latest PostgreSQL 9.5 client installation package for Red Hat Linux 6. The following procedure uses the latest version of PostgreSQL 9.5 as an example to illustrate how to obtain the required installation package and install the PostgreSQL client.

Procedure

  1. Obtain the PostgreSQL client installation package.

    Find the link to the required version on the download page. postgresql95 is used as an example in the following figure.

    Figure 1 Downloading the PostgreSQL client installation package

  2. Obtain the dynamic shared library package required for the PostgreSQL client.

    Find the link to the required version on the download page. postgresql95-libs is used as an example in the following figure.

    Figure 2 Downloading the dynamic shared library package

  3. Upload the installation and dynamic shared library packages to the ECS.

    NOTE:

    When you create an ECS, select an OS, such as Red Hat 6.6, and bind an EIP to it. Then, upload the installation and dynamic shared library packages to the ECS using a remote tool, and use PuTTY to connect to the ECS.

  4. Run the following command to install the PostgreSQL client:

    sudo rpm -ivh postgresql95-9.5.7-1PGDG.rhel6.x86_64.rpm postgresql95-libs-9.5.7-1PGDG.rhel6.x86_64.rpm
    NOTE:
    • If any conflicts occur during the installation, add the replacefiles parameter to the command and try to install the client again. Example:
      rpm -ivh --replacefiles postgresql95-9.5.7-1PGDG.rhel6.x86_64.rpm postgresql95-libs-9.5.7-1PGDG.rhel6.x86_64.rpm
    • If you are prompted to install a dependency package, add the nodeps parameter to the command and install the client again. Example:
      rpm -ivh --nodeps postgresql95-9.5.7-1PGDG.rhel6.x86_64.rpm postgresql95-libs-9.5.7-1PGDG.rhel6.x86_64.rpm