Last edit by philipp October 15, 2017 09:52

How to install Postgres 9 on Debian 8

This guide describes, how to set up Postgres 9.4 on Debian 8.

Get Packages

root@jessie:~$ apt install postgresql-9.4
root@jessie:~$ nano /etc/postgresql/9.4/main/postgresql.conf

Allow Remote Access

...
listen_addresses='*'
...
root@jessie:~$ nano /etc/postgresql/9.4/main/pg_hba.conf
...
host     all             all             0.0.0.0/24        md5
root@jessie:~$ service postgresql restart

Set Master Password

root@jessie:~$ su postgres
postgres@jessie:~$ psql
psql (9.4.13)
Geben Sie »help« für Hilfe ein.

postgres=# \password postgres
Neues Passwort eingeben: ************

Troubleshooting

root@jessie:~$ apt remove --purge postgresql
root@jessie:~$ locale-gen de_DE de_DE.UTF-8 
root@jessie:~$ dpkg-reconfigure locales
root@jessie:~$ apt install postgresql

The content on this page is licensed under Creative Commons Attribution 4.0 International license.