I would like to install just the PostgreSQL client tool (psql) on RHEL on a container to connect to an Azure database for PostgreSQL server. Can you please point me step by step instructions on how to do the same?. I do not want to install the entire postgresql server
2 Answers
On RedHat, and compatible systems, in order to install just the client only, the command is:
sudo yum install postgresql
or maybe dnf, but dnf may be Fedora? The above command installs only the client tools and their dependencies!
For a full-blown server install (should you require it in the future), the command is:
sudo yum install postgresql-server
You can back out either of the commands above by issuing the command:
sudo yum remove <package name>
i.e.
sudo yum remove postgresql
to uninstall your PostgreSQL client tools.
You may wish to consider a GUI:
pgAdminan Open Source "sister project" to the main server one, very much tailored to PostgreSQL. Feature complete, but a bit resource heavy. Although the same could be said of Java clients...OmniDB I have not used it much, but have heard good things)
JDBC
- SQuirreL SQL - used a bit and liked
- DBeaver - used a very small bit - similar to SQuirreL SQL
Windows (if of interest to you for other machines/boot environments)
- HeidiSQL - used a little, fine. Very "bright and breezy" - a light, pleasant touch to it, if you have a Windows desk- or lap-top.
Unless you have a compelling reason not to use pgAdmin, I'd go with that first but you may have your own toolkit.
- 30,923
- 9
- 73
- 85
Modern RHEL should have postgresql in a module.
If you need to install a spesific version you can use
dnf install @postgresql:VER/client
e.g. dnf install @postgresql:20/client
Sometimes it'll just be under postgresql with the server component split into postgresql-server
Check with dnf repoquery -l postgresql if you want to make sure.
- 143
- 5