To check the status of the postgresql service, systemctl status postgresql-12Īctivate the postgresql service to automatically start on system reboot, systemctl enable postgresql-12 Run this command to start the postgresql service, systemctl start postgresql-12 usr/pgsql-12/bin/postgresql-12-setup initdb yum install postgresql12-serverĪfter the packages are installed, You can initialize the database using the below command. Installing PostgreSQL from the repostory. You can use the same procedure to install different version. Now We will install the latest version (12) of PostgreSQL from the repository. With this method, You can choose the specific version of postgresql from the official postgresql repository. Next We will see how to install postgresql latest version from the official postgresql repository.īefore that, If you want to remove existing PostgreSQL (older version) installed on the system, Run the below command, sudo yum remove postgresql-server postgresql-contrib Installing PostgreSQL Using The Official PostgreSQL Repository 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.
0 Comments
Leave a Reply. |