* Versões utilizadas: Debian 8.5(Jessie) AMD64 + PostgreSQL-9.4
* Baixar os pacotes no servidor
# apt-get install postgresql
* Liberar acesso para qualquer rede
# vi /etc/postgresql/9.4/main/postgresql.conf
listen_addresses = '*'
* Abra o arquivo # vi /etc/postgresql/9.4/main/pg_hba.conf e ajuste as linhas:
# Database administrative login by Unix domain socket
local all postgres trust
# IPv4 local connections:
host all all 0.0.0.0/0 md5
* Reinicie o serviço
# /etc/init.d/postgresql restart
* Acesse o console do postgres
# psql -U postgres
postgres=# ALTER USER postgres with password '<PASSWORD>';
postgres=# \q
* Ajuste novamente o arquivo pg_hba.conf
# Database administrative login by Unix domain socket
De:
local all postgres trust
Para:
local all postgres md5
* Reinicie o serviço
# /etc/init.d/postgresql restart
1 / 2 / 3 / 4 / 5