Skip to content

Instantly share code, notes, and snippets.

@mei-li
Last active September 14, 2017 11:49
Show Gist options
  • Save mei-li/defb010feb0e7fe2bd33 to your computer and use it in GitHub Desktop.
Save mei-li/defb010feb0e7fe2bd33 to your computer and use it in GitHub Desktop.
# install POSTGRES
# remove password for localhost
# Update localhost and 127.0.0.1 to trust
# add the following lines to /etc/postgresql/9.3/main/pg_hba.conf in the hosts part
# make sure there are no other localhost or 127.0.0.1 lines
host all all 127.0.0.1 trust
host all all localhost trust
sudo vim /etc/postgresql/9.3/main/pg_hba.conf
# fix max_prepared_transactions
# edit /etc/postgresql/9.3/main/postgresql.conf
# change max_prepared_transactions to 10
sudo /etc/init.d/postgresql restart
sudo -u postgres createuser --superuser $USERNAME
createdb $USERNAME
# sudo -u postgres psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment