Postgresql

1. Update

sudo apt-get update

2. Install

sudo apt-get install postgresql postgresql-contrib -y
sudo -i -u postgres
psql
ALTER USER postgres WITH PASSWORD 'new_password';

Change new password replace new_password to your password

3. Open public network access to database

sudo find / -name "postgresql.conf"

Find postgresql.conffile

Edit postgresql.conf

listen_addresses = '*'
/etc/postgresql/9.5/main/pg_hba.conf

Change 9.5 to your version

host all all 0.0.0.0/0 md5
service postgresql restart

Last updated

Was this helpful?