Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created February 20, 2019 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkeam/b65be0fd227d7ce5403570a58191cda2 to your computer and use it in GitHub Desktop.
Save jkeam/b65be0fd227d7ce5403570a58191cda2 to your computer and use it in GitHub Desktop.
Postgres Setup
# install postgres
sudo apt update
sudo apt install postgresql postgresql-contrib libpq-dev
# login as postgres user
sudo -i -u postgres
# log into psql shell
psql
# set password
> \password
# enter in password and then confirmation
# quit
> \q
# update postgres login config
sudo vi /etc/postgresql/10/main/pg_hba.conf
# comment out peer and add in password
# comment out this one
# local all postgres peer
# add this line
# local all postgres password
# restart
sudo service postgresql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment