Oracle Linux 6.8 PostgreSQL Server IP: 192.168.10.220
Windows 7 x64 pgAdmin Custom Port IP: 192.168.10.2
Unable to connect to server:
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "192.168.10.220" and accepting
TCP/IP connections on port 5432?
Oracle Linux 6.8 Server IP: 192.168.10.220
[[email protected] usr]# find / -name postgresql.conf
/var/lib/pgsql/10/data/postgresql.conf
[[email protected] ~]# vi /var/lib/pgsql/10/data/postgresql.conf
listen_addresses = ‘*‘ # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to ‘localhost‘; use ‘*‘ for all
# (change requires restart)
port = 5432 # (change requires restart)
[[email protected] ~]# vi /var/lib/pgsql/10/data/pg_hba.conf
# Add by QWR on 2018-02-20
# IPv4 local connections:
host all all 192.168.10.1/24 trust
[[email protected] ~]# netstat -a | grep PGSQ
unix 2 [ ACC ] STREAM LISTENING 17881 /tmp/.s.PGSQL.5432
unix 2 [ ACC ] STREAM LISTENING 17880 /var/run/postgresql/.s.PGSQL.5432
[[email protected] ~]# reboot