postgress 设置内网访问

  • 如果是阿里云内网需要配置一下安全组,允许出方向的ip
  • 更新 /etc/postgresql/9.3/main/postgresql.conf,表示监听在哪个IP上面
listen_addresses = '10.40.94.45'          # what IP address(es) to listen on;
  • 更新 /etc/postgresql/9.3/main/pg_hba.conf, 表示哪个IP可以访问服务
host    all    all    10.24.245.39/32    md5
  • 重启服务

你可能感兴趣的:(postgress 设置内网访问)