Initializing help system before first use

Configuring PostgreSQL on RHEL

Configure PostgreSQL by storing the database files in an alternative location, initializing the data directory, setting the database service to start on boot, and start the database service.
  1. (Optional) If you want to store database files in an alternative location follow the steps in the section Specifying an Alternative PostgreSQL Data Directory on RHEL .
  2. Initialize the PostgreSQL data directory:
    • Red Hat Enterprise Linux 6: service postgresql-11 initdb
    • Red Hat Enterprise Linux 7: /usr/pgsql-11/bin/postgresql-11-setup initdb
  3. Set the database service to start on boot: chkconfig postgresql-11 on
  4. Start the database service: service postgresql-11 start