PostgreSQL 10 Released. PostgreSQL is an open source object-relational, highly scalable, SQL-compliant database management system. PostgreSQL is developed at the University of California at Berkeley Computer Science Department. This article will help you to install PostgreSQL 10 on CentOS, RHEL and Fedora Systems.
Step 1 – Add Postgres Yum Repository
The first step is to install PostgreSQL repository in your system, Use one of below commands as per your system architecture and operating system.
For more details visit PostgreSQL repositories link page where you can get repository package rpm for various operating systems.
Step 2 – Install PostgreSQL 10 Server
After enabling PostgreSQL yum repository in your system use following command to install PostgreSQL 10 on your system with yum package manager.
Step 3 – Initialize PGDATA
After installing PostgreSQL server, It’s required to initialize it before using the first time. To initialize database use below command.
Above command will take some time to initialize PostgreSQL first time. PGDATA environment variable contains the path of data directory.
PostgreSQL data directory Path: /var/lib/pgsql/10/data/
Setp 4 – Start PostgreSQL Server
To start PostgreSQL service using the following command as per your operating systems. Also, enable PostgreSQL service to autostart on system boot.
For CentOS/RHEL 7 and Fedora
For CentOS/RHEL 6
Step 5 – Verify PostgreSQL Installation
After completing above steps, you have installed PostgreSQL 10 on your server, Let’s log in to postfix to verify that installation completed successfully.
You may create password for user postgres for security purpose.
Congratulation’s! You have successfully installed PostgreSQL Server. Read below article to install phpPgAdmin.