

To check the version of postgresql installed on the system, postgres -versionīe default, PostgreSQL runs on the port 5432 and listens to localhost only.To check, netstat -nltp |grep postgres systemctl status postgresqlĮnable the postgresql service to start automatically on system reboot.

To check the status of postgresql service, Run the below command. postgresql-setup initdbĪfter initializing the database, Start the postgresql service using the below command. We need to initialize the database using the below command. sudo yum install postgresql-server postgresql-contrib Update the centos default software repository, yum updateĪnd install the postgresql packages using the below command. Login to the Server, make sure you have sudo or root privileges to install packages.
