How to install psql on Linux

Parent post: Setup ESE with PostgreSQL using HiveMQ Operator

 Instructions

For Ubuntu and Debian-based Systems:

  1. Update Package Lists:

    sudo apt update
  2. Install psql:

    sudo apt install postgresql-client
  3. Test Installation:

    psql --version

For Fedora:

  1. Install psql:

  2. Test Installation:

For CentOS:

  1. Enable PostgreSQL Repository:

  2. Install psql:

  3. Test Installation:

For openSUSE:

  1. Install psql:

  2. Test Installation:

Generic Linux Instructions:

If your distribution isn't mentioned, you can often use your package manager to install psql. For example:

  • For Debian-based systems (like Ubuntu):

  • For Red Hat-based systems (like CentOS):

  • For systems using the zypper package manager (like openSUSE):

     

Remember that you might need to adjust the commands based on your Linux distribution. Once installed, you can use psql to connect to PostgreSQL databases from the command line.

Verify the installation by running:

These instructions are general, and the package names might vary slightly based on the Linux distribution and version. Adjust the commands accordingly based on your system.

 Related articles

Filter by label

There are no items with the selected labels at this time.