Skip to content

Instantly share code, notes, and snippets.

@zicodhkbd
Created November 1, 2019 17:44
Show Gist options
  • Save zicodhkbd/85b1a94c612433ad9f9877463166d0fe to your computer and use it in GitHub Desktop.
Save zicodhkbd/85b1a94c612433ad9f9877463166d0fe to your computer and use it in GitHub Desktop.
PostgreSQL 10 on Ubuntu 18.04
#!/bin/sh
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -sc)-pgdg main" > /etc/apt/sources.list.d/PostgreSQL.list'
sudo apt update
sudo apt-get install postgresql-10
sudo systemctl stop postgresql.service
sudo systemctl start postgresql.service
sudo systemctl enable postgresql.service
sudo systemctl status postgresql.service
sudo su -l postgres
psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment