Created
February 20, 2019 02:41
-
-
Save jkeam/b65be0fd227d7ce5403570a58191cda2 to your computer and use it in GitHub Desktop.
Postgres Setup
This file contains hidden or 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
# 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