Last active
August 29, 2015 14:04
-
-
Save callicles/4809d4b9b951ace3ec32 to your computer and use it in GitHub Desktop.
Configure postgres on Debian Wheezy 7.4 vagrant
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
# Used for creating a vagrant dev database server. | |
# Do not use as is for production purposes . | |
sudo -u postgres psql template1 | |
ALTER USER postgres with encrypted password 'psqlVagrant'; | |
sudo vim /etc/postgresql/9.1/main/pg_hba.conf | |
# modify the first line of the authentification rule with: | |
# (Administrative login) | |
# local all postgres md5 | |
# and the other local line | |
# local all all md5 | |
# just beneath the host line add this line | |
# host all all 10.0.2.2 md5 | |
sudo /etc/init.d/postgresql restart | |
# Check that it is working by $> psql -U postgres | |
createuser -U postgres -d -e -E -l -P -r -s vagrant | |
# mdp vagrantDb | |
createdb VagrantDB | |
sudo vim /etc/postgresql/9.1/main/postgresql.conf | |
# listen_adresses = '*' | |
sudo /etc/init.d/postgresql restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment