This article is related to Install Postgresql Database Centos7/RHEL7.
PostgreSQL could be a powerful, open supply object-relational info system that uses and extends the SQL language combined with several options that safely store and scale the foremost sophisticated knowledge workloads. The origins of PostgreSQL originate to 1986 as a part of the POSTGRES project at the University of California at Berkeley and has quite thirty years of active development on the core platform.
PostgreSQL has attained a robust name for its proved design, responsibility, knowledge integrity, strong feature set, extensibility, and also the dedication of the open supply community behind the software system to systematically deliver performant and innovative solutions. PostgreSQL runs on all major in operation systems, has been ACID-compliant since 2001, and has powerful add-ons like the favored PostGIS geospatial info extender. it’s no surprise that PostgreSQL has become the open supply electronic information service of alternative for several folks and organisations. In this article we will show how to install Postgresql database Centos7/RHEL7
Enable PostgreSQL Yum Repository
If you require to install postgresql 12 on Centos7/RHEL7 then install below repos RPMS
If you require to install postgresql 10 on Centos7/RHEL7 then install below repos RPMS
https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm
To install postgresql10 on Centos6/RHEL6 install download following yum repo RPM Package.
CentOS/RHEL – 6
In This article we are going to Install Posgresql 10 Database on Centos7
[root@server ~]#yum install postgresql10-server postgresql10
Initialize PGDATA
After installing PostgreSQL server, We have to required initialize database before using the first time. To initialize database use below command.
Now time to Start PostgreSQL Server
To start PostgreSQL service daemon by using the following command and Also, enable PostgreSQL daemon to autostart on system boot.
For CentOS/RHEL 7 and Fedora
[root@server ~]#systemctl enable postgresql-10.service
For CentOS/RHEL 6
[root@server ~]#chkconfig postgresql-10 on
Finally verify postgresql database installation
Password:
psql (10.6)
Type “help” for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
———–+———-+———–+————+————+———————–
postgres | postgres | UTF8 | en_US.UTF8 | en_US.UTF8 |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
testlive | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
(4 rows)
postgres=# \q
To take backup of postgresql database
To restore backup of postgresql database
CREATE SCHEMA
ALTER SCHEMA
CREATE EXTENSION
COMMENT
CREATE FUNCTION
ALTER FUNCTION
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
You have completed successfully the PostgreSql database instalaltion on Centos 7/RHEL7
One thought on “Install Postgresql Database Centos7/RHEL7”-
Pingback: How to install phpPgAdmin using Yum - The LinuxPcFix