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.
- (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 .
- 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
- Set the database service to start on boot: chkconfig postgresql-11 on
- Start the database service: service postgresql-11 start