I have Fedora-31 Template. And a VM based on this template.
I installed PSQL in Template:
$ sudo dnf install postgresql postgresql-server
If I try to connect to PSQL from my VM using Python, I get the following error:
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host “127.0.0.1” and accepting
TCP/IP connections on port 5432?
If I type “$ postgres --version” in my VM, I get “postgres (PostgreSQL) 11.8”, so I think it is installed properly.
There are some pretty specific questions there. Have you tried to
answer them?
(Hint - You can use netstat -lntp to show listening ports and associated
programs, or better, `ss -tunlp``)
There’s nothing Qubes specific here. Don’t forget that many problems
can be solved by looking at standard distro instructions.
The only Qubes specific thing here will be storing the database data in
a persistent place - and for that purpose remember that /rw/usrlocal
is mounted at /usr/local, and so persists across AppVM reboots.