Based on https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04
Install PosgreSQL:
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
- Find out where configuration files are stored:
sudo -u postgres psql # use \q to exit
show config_file; # somethis like /etc/postgresql/9.5/main...
\q
-
Cchange in posgresql.config
#listen_addresses = 'localhost' # what IP address(es) to listen on;
- to
listen_addresses = '*' # what IP address(es) to listen on;
-
Add in pg_hba.conf
- host all all 10.0.0.0/8 md5
Change through
psql
the password for database login postgres: - \password postgres
- host all all 10.0.0.0/8 md5
Change through
-
Restart postgresql:
- exit (to logout from postgres user session)
- systemctl restart postgreql
No comments :
Post a Comment