PostgreSQL 10 Admin Guide RedHat Linux

December 16th, 2017 by thelinuxevangelist

PostgreSQL 10 Admin Guide RedHat Linux

You are Welcome! This Article Resume the Start-Up Procedure Following to Installation for Getting-Started with PostgreSQL 10 Administration on RedHat Linux.

And this Fedora PostgreSQL 10 Admin Guide let you make the First Steps Easily with PostgreSQL 10 Database.

The Procedure Described is Expressly Resumed in Few Words to Give Focus to the Essential Commands Needed to the Initial SetUp.

Finally the post include also informations on Installing PostgreSQL 10 on RedHat and PostgreSQL 10 Online Docs.

PostgreSQL Admin Guide RedHat Linux - Featured
  1. How-to Install the PostgreSQL 10 Server on RedHat

    PostgreSQL 10 RedHat Install
  2. First Make Needed Directories

    sudo mkdir -p /home/postgres/data

    Set postgres as Owner with:

    sudo chown -R postgres:postgres /home/postgres
  3. 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

  4. Login as the postgres User

    su postgres

    Change to the Home Directory:

  5. Then Setup First PostgreSQL DB Cluster

    initdb -D /home/postgres/data
  6. Next Start PostgreSQL Server

    pg_ctl -D /home/postgres/data -l logfile start
  7. Create a PostgreSQL test Database

    createdb test
  8. Finally 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
  9. Then to Create a Table

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

  11. Again Listing Databases


    ‘q’ to Quit.

  12. For More See PostgreSQL 10 Online Documentation

    PostgreSQL 10 SQL Guide
  13. Finally to Delete test Database

    dropdb test
  14. For PostgreSQL 10 GUI Administration Install PgAdmin 4

    PgAdmin4 on RedHat Install

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