Execute command
Yum Install Postgresql-server
Yum Install Postgresql-contrib
After the installation is complete, check the service status of PostgreSQL
Systemctl Status PostgreSQL
Service not started
Execute SYSTEMCTL start PostgreSQL startup service
The execution process may cause an error
Job for Postgresql.service failed because the control process exited with error code. See "Systemctl Status Postgresql.service" and "Journalctl-xe" for details.
Initialization of the database after PostgreSQL installation
Execute Postgresql-setup INITDB
Start the PostgreSQL service again
Viewing PostgreSQL process information with the PS command
Switch to PostgreSQL user to perform psql operation with Su–postgres
Use \l to view all database information for PostgreSQL
You can see that PostgreSQL is installed correctly. To start PostgreSQL each time you boot, execute the following command
To this PostgreSQL basic installation and configuration is complete.
More articles about the public number "kick genius"
CENTOS7 Installation Configuration PostgreSQL