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
-
Doesn't Azure have a howto for that? If not, are you sure an Azure database can be accessed from outside?Gerard H. Pille– Gerard H. Pille2021年09月01日 10:01:21 +00:00Commented Sep 1, 2021 at 10:01
2 Answers 2
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:
pgAdmin
an 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.
-
thanks. But i do not want the complete postgres server. I just want the client tools(psql). is there a way to just install connecting tools to query remote postgresql server?kevin– kevin2021年09月01日 12:58:00 +00:00Commented Sep 1, 2021 at 12:58
-
Thank you Verace. that is clearkevin– kevin2021年09月01日 14:01:33 +00:00Commented Sep 1, 2021 at 14:01
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.
Explore related questions
See similar questions with these tags.