How To Install PostgreSQL 10 on CentOS7
To Install PostgreSQL 10 on CentOS7
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 tutorial covers the method to install PostgreSQL 10 on CentOS 7.
Installing PostgreSQL 10
First, make sure you n add Postgres Yum Repository by making use of the following command.
[root@linuxhelp ~]# yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-1.noarch.rpm
Loaded plugins: fastestmirror, langpacks
pgdg-redhat10-10-1.noarch.rpm | 4.5 kB 00:00:00
Examining /var/tmp/yum-root-JTrcnL/pgdg-redhat10-10-1.noarch.rpm: pgdg-redhat10-10-1.noarch
Marking /var/tmp/yum-root-JTrcnL/pgdg-redhat10-10-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pgdg-redhat10.noarch 0:10-1 will be installed
--> Finished Dependency Resolution
.
.
Installing : pgdg-redhat10-10-1.noarch 1/1
Verifying : pgdg-redhat10-10-1.noarch 1/1
Installed:
pgdg-redhat10.noarch 0:10-1
Complete!
Once it is done, you shall go on with the Installation of PostgreSQL 10 Server by making use of the following command. This installs Yum packet manager as well.
[root@linuxhelp ~]# yum install postgresql10-server
Loaded plugins: fastestmirror, langpacks
pgdg10-updates-testing | 4.1 kB 00:00:00
(1/2): pgdg10-updates-testing/7/x86_64/group_gz | 245 B 00:00:01
(2/2): pgdg10-updates-testing/7/x86_64/primary_db | 156 kB 00:00:02
Determining fastest mirrors
* base: centos.mirror.net.in
* extras: centos.mirror.snu.edu.in
* updates: mirror.ehost.vn
Resolving Dependencies
--> Running transaction check
---> Package postgresql10-server.x86_64 0:10.2-1PGDG.rhel7 will be installed
--> Processing Dependency: postgresql10-libs(x86-64) = 10.2-1PGDG.rhel7 for package: postgresql10-server-10.2-1PGDG.rhel7.x86_64
--> Processing Dependency: postgresql10(x86-64) = 10.2-1PGDG.rhel7 for package: postgresql10-server-10.2-1PGDG.rhel7.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql10-server-10.2-1PGDG.rhel7.x86_64
--> Running transaction check
---> Package postgresql10.x86_64 0:10.2-1PGDG.rhel7 will be installed
---> Package postgresql10-libs.x86_64 0:10.2-1PGDG.rhel7 will be installed
--> Finished Dependency Resolution
.
.
Installed:
postgresql10-server.x86_64 0:10.2-1PGDG.rhel7
Dependency Installed:
postgresql10.x86_64 0:10.2-1PGDG.rhel7 postgresql10-libs.x86_64 0:10.2-1PGDG.rhel7
Complete!
After installing PostgreSQL server, It’ s required to initialize it before using the first time.
[root@linuxhelp ~]# /usr/pgsql-10/bin/postgresql-10-setup initdb
Initializing database ... OK
Once it is done, you need to start and enable PostgreSQL server.
[root@linuxhelp ~]# systemctl start postgresql-10.service
[root@linuxhelp ~]# systemctl enable postgresql-10.service
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-10.service to /usr/lib/systemd/system/postgresql-10.service.
Once it is done, you need to log in to postfix to verify if that installation has been completed successfully.
[root@linuxhelp ~]# su - postgres -c " psql"
psql (10.2)
Type " help" for help.
postgres=# password postgres
Enter new password:
Enter it again:
postgres=#
With this, the method to install PostgreSQL 10 on CentOS7 comes to an end.
Comments ( 0 )
No comments available