Created
December 13, 2018 01:11
-
-
Save jonpemby/13befdc028e32cdd8f91134bfcc5ac0d to your computer and use it in GitHub Desktop.
Set up Postgres on Ubuntu
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
sudo apt-get install wget ca-certificates | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
# Add repository | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' | |
# Install | |
sudo apt-get update | |
sudo apt-get install postgresql postgresql-contrib | |
# Connect | |
sudo su - postgres | |
psql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment