How to install psql on Linux
Parent post: Setup ESE with PostgreSQL using HiveMQ Operator
Instructions
For Ubuntu and Debian-based Systems:
Update Package Lists:
sudo apt updateInstall
psql:sudo apt install postgresql-clientTest Installation:
psql --version
For Fedora:
Install
psql:sudo dnf install postgresqlTest Installation:
psql --version
For CentOS:
Enable PostgreSQL Repository:
sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpmInstall
psql:sudo yum install postgresql14Test Installation:
psql --version
For openSUSE:
Install
psql:sudo zypper install postgresqlTest Installation:
psql --version
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):
sudo apt-get install postgresql-clientFor Red Hat-based systems (like CentOS):
sudo yum install postgresqlFor systems using the
zypperpackage manager (like openSUSE):sudo zypper install postgresql
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:
psql --versionThese 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.