Created
July 15, 2016 12:25
-
-
Save charly-vega/67b37167c302dd3c516fb91dbc2f4897 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# root | |
sudo apt-get update | |
sudo apt-get install postgresql postgresql-contrib | |
sudo -i -u postgres | |
# postgres | |
createuser # TODO superuser, with password | |
echo "host all $USERNAME 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf | |
echo "listen_addresses = '*'" >> /etc/postgresql/9.3/main/postgresql.conf | |
exit | |
# back to root | |
sudo service postgresql restart | |
sudo ufw allow ssh | |
sudo ufw allow postgres | |
sudo ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment