Skip to content

Postgres Installation

Bubbo edited this page Sep 26, 2024 · 1 revision

Ubuntu Installation

  1. Update package list:

    sudo apt update
  2. Install PostgreSQL:

    sudo apt install -y postgresql postgresql-contrib
  3. Start PostgreSQL service:

    sudo systemctl start postgresql
  4. Enable PostgreSQL to start on boot:

    sudo systemctl enable postgresql
  5. Access PostgreSQL as postgres user and create a database:

    sudo -u postgres psql

    Once inside the PostgreSQL prompt, you can create a database:

    CREATE DATABASE dbname;
  6. Add the postgres URL to the DB

postgresql://username:password@hostname:port/databasename

Clone this wiki locally