1. 通过find / -name postgresql.conf 和 find / -name pg_hba.conf 找到这两个文件
2. 设置外网访问:
1)修改配置文件 postgresql.conf
listen_addresses = '*'
2)修改pg_hba.conf 在原来的host下面新加一行
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 password
3. 重新启动服务:service postgresql-11 restart
可参考该文章:https://blog.youkuaiyun.com/love_lixr/article/details/83989111