Setup - Ubuntu
1. Update the System
sudo apt update
sudo apt upgrade -y2. Install PostgreSQL
sudo apt install postgresql postgresql-contrib -y3. Start and Enable the PostgreSQL Service
sudo systemctl start postgresql
sudo systemctl enable postgresql4. Switch to the PostgreSQL User
sudo -i -u postgres5. Access the PostgreSQL Command-Line Interface (psql)
psqlpostgres=#6. Create a New Database
7. Create a New User
8. Grant Privileges
9. Exit psql
psql10. Allow Remote Connections (Optional)
11. Test the Setup
12. Install Additional Tools (Optional)
Notes
Steps to Install pgAdmin4 on Ubuntu
pgAdmin4 on UbuntuTroubleshooting
1. Create the tuser Table
tuser Table2. Insert Data into the tuser Table (Create)
tuser Table (Create)3. Retrieve Data from the tuser Table (Read)
tuser Table (Read)4. Update Data in the tuser Table (Update)
tuser Table (Update)5. Delete Data from the tuser Table (Delete)
tuser Table (Delete)6. Drop the tuser Table
tuser TableLast updated