Postgres Quick Start on Ubuntu, production ready

Yang Li
1 min readJul 8, 2020

--

  1. Install
sudo apt update
sudo apt install postgresql postgresql-contrib
#to verify
sudo su - postgress
psql
\q

2. Create database

sudo su - postgres
createdb stock
psql
\c stock

3. Start/Stop/Status

sudo systemctl start postgresql
sudo systemctl stop postgresql
sudo systemctl status postgresql
sudo systemctl disable postgresql
sudo systemctl enable postgresql

--

--

No responses yet