ubuntu install postgresQL
Install
(1)sudo apt-get install postgresql pgadmin3
Change the password After installation, there will be a default postgres user
(2)sudo -u postgres psql template1
(3)ALTER USER postgres with encrypted password 'a';
Set the password to exit
reboot
(4)sudo systemctl restart postgresql.service
Next, you need to modify two configuration files
cd /etc/postgresql/9.5/main
Modify the pg_hba.conf file
0.0.0.0/0 md5
Then modify the file postgresql.conf
After modifying these two files, you can allow remote access
Then restart postgresql
sudo /etc/init.d/postgresql restart
Completed the installation configuration