Postgresql configuration

From wikinotes
Revision as of 13:01, 15 September 2019 by Will (talk | contribs) (Created page with "= Locations = <blockquote> {| class="wikitable" |- | <code>/var/db/postgres/data96/postgresql.conf</code><br><code>/etc/postgresql/9.5/main/postgresql.conf</code> || || postgr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Locations

/var/db/postgres/data96/postgresql.conf
/etc/postgresql/9.5/main/postgresql.conf
postgresql config
/usr/lib/share/postgresql/postgresql.conf.sample sample config

Files

postgresql.conf

Allow connections from this host's static ip-address.

# /var/db/postgres/data96/postgresql.conf
# =======================================

# listen on ports other than localhost
listen_addresses = 'localhost,192.168.1.100' # replace 192.168.1.100 with your machine's static ip
                                             # (alternatively use 0.0.0.0, and you can accept any connection)

pg_hba.conf

Allow connections from any host, provided they can be authenticated by password (by default hashed using MD5.

/var/db/postgres/data96/pg_hba.conf
# allow users to connect from other machines
host all all 0.0.0.0/0  md5