PostgreSQL installation on CentOS 7

For the installation of our PostgreSQL database, we need to log in to our server with the privileges of the root user.

1- Installing PostgreSQL from CentOS 7 repositories is relatively simple. We will start by executing the following command:

# yum install postgresql-server postgresql-contrib

2- At the end of the installation we start the configuration of our PostgreSQL database with the following command:

# postgresql-setup initdb

3- We start our PostgreSQL database
  After starting the configuration of our PostgreSQL database, we start it with the following command:

# systemctl start postgresql

4- Enable PostgreSQL
  Finally, we enable our PostgreSQL database to start automatically and permanently at each system startup.

# systemctl enable postgresql

Was this answer helpful?

Related Articles

MariaDB installation

MariaDB is an open source relational database management system, compatible with previous...

How to reset MariaDB password

How to reset MariaDB root user password If for some reason you have forgotten the password of...

How to improve MariaDB security

Executing the command (mysql_secure_installation) we can increase the security of our MariaDB...