PostgreSQL 9 Administration Guide Quick Start on Debian Linux

October 16th, 2017 by thelinuxevangelist

PostgreSQL 9 Administration Guide Debian




This Article Resume the Start-Up Procedure Following to Installation for Getting-Started with PostgreSQL 9 Administration on Debian Linux.

If you Did Not Still Installed the PostgreSQL Server you Find Below Link to Install the PostgreSQL on Debian 12 Gnome Desktop.

The Procedure Described is Expressly Resumed in Few Words to Give Focus to the Essential Commands Needed to the Article-Install Set-Up.

PostgreSQL on Debian
  1. How-to Install the PostgreSQL 9 Server on Debian:

    PostgreSQL on Debian
  2. Set the postgres User Password

    sudo passwd postgres

    Give a Password to the postgres User Account.
    If Got “User is Not in Sudoers file” then Look: Solution

  3. Login as the postgres User

    su postgres
  4. Create a PostgreSQL test Database

    createdb test

    If your Database is Not Already Started or the psql Command do Not Works look Into this Troubleshooting:

    How-to StartUp the PostgreSQL 9 Server:

    PostgreSQL on Debian Tips
  5. Access PostgreSQL Database CLI
    First Set the postgres Database’s Password:

    psql template1
    template1# password postgres

    And Exit with:

    template1# \q

    Then to Access test Database:

    psql test
  6. Then to Create a Table

    CREATE TABLE account(
        user_id serial PRIMARY KEY,
        username VARCHAR (50) UNIQUE NOT NULL 
    );
    
  7. Next to List Tables

    \dt
  8. Again Listing Databases

    \l

    ‘q’ to Quit.

  9. For More See PostgreSQL 9 Online Documentation

    PostgreSQL 9 SQL Guide
  10. Finally to Delete test Database

    dropdb test
  11. For GUI Administration Install PgAdmin 3:

    PgAdmin3 on Debian Install

Tags: , , , , , , , , , , ,