防火墙已经关闭
postgresql.conf文件中listen_addresses = '*'配置好
pg_hba.conf文件中host all all 0.0.0.0/0 trust追加过
但netstat -nultp查看 发现postgres为 127.0.0.0:5432 显然是没有远程访问
通过find / -name ‘pgsql’ 发现有安装过一次失败记录 在/var/lib/pgsql目录下
进行删除,并且把postgresql的data目录中内容也删除
rpm -qa | grep postgres
查出存在的pg
rpm -e
删除存在的pg(存在依赖关系,删不掉的先删其他的,再删删不掉的这个)
重新安装,netstat -nlutp 查看是否变为 0.0.0.0:5432
Connection to xxx.xxx.xx.xxx:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Connection refused: connect
Connection refused: connect