1

I was install postgresql95 on centos 7(in my server), but i can't remote the postgresql with pgadmin from my laptop. I have try any way, but still can't remote it.

I have done setup on postgresql.conf and pg_hba.conf

i changed this in postgresql.conf

#listen_addresses = '*' 

and add this in pg_hba.conf

host    all             all             0.0.0.0/0               trust
host    all             all             ::/0                    trust

I try to restart my postgresql

systemctl start postgresql-9.5
systemctl stop postgresql-9.5

But still can't remote it. I try to do something with my firewall like this

firewall-cmd --permanent --zone=public --add-port=5432/tcp
firewall-cmd --permanent --zone=public --add-port=5432/udp
firewall-cmd --reload

It runs fine when I open port 80 to access my server, but it does not work properly for port 5432.

ikhwan aja
  • 23
  • 1
  • 4

1 Answers1

1

Remove the # from #listen_addresses = '*'. You have it commented out.

The line should look like:

listen_addresses = '*'

Nasir Riley
  • 2,035
  • 8
  • 9