How to Install PostgreSQL 11 on CentOS 7.6
- 00:32 rpm -q centos-release
- 00:49 yum install https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
- 01:15 yum install postgresql11-server
- 01:42 /usr/pgsql-11/bin/postgresql-11-setup initdb
- 02:17 systemctl start postgresql-11.service
- 02:33 systemctl enable postgresql-11.service
- 02:52 sudo -u postgres psql
Installation of PostgreSQL 11 on Centos 7.6
PostgreSQL 11 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 11 on CentOS 7.6.
Installation
Check the centos version by using the following command
[root@linuxhelp ~]# rpm -q centos-release
centos-release-7-6.1810.2.el7.centos.x86_64
Need to configure the PostgreSQL repository in your system by using the following command
[root@linuxhelp ~]# yum install https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
BDB2053 Freeing read locks for locker 0x3d0: 17545/140054075111232
BDB2053 Freeing read locks for locker 0x3d5: 17545/140054075111232
Loaded plugins: fastestmirror, langpacks
pgdg-redhat-repo-latest.noarch.rpm | 5.6 kB 00:00:00
Examining /var/tmp/yum-root-7eiWGV/pgdg-redhat-repo-latest.noarch.rpm: pgdg-redhat-repo-42.0-4.noarch
Marking /var/tmp/yum-root-7eiWGV/pgdg-redhat-repo-latest.noarch.rpm to be installed
.
.
.
Installing : pgdg-redhat-repo-42.0-4.noarch 1/1
Verifying : pgdg-redhat-repo-42.0-4.noarch 1/1
Installed:
pgdg-redhat-repo.noarch 0:42.0-4
Complete!
Install postgresql 11 on by using the following command
[root@linuxhelp ~]# yum install postgresql11-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.mirrors.estointernet.in
* extras: centos.mirrors.estointernet.in
* updates: centos.mirrors.estointernet.in
pgdg10 | 3.6 kB 00:00:00
pgdg11 | 3.6 kB 00:00:00
pgdg94 | 3.6 kB 00:00:00
pgdg95 | 3.6 kB 00:00:00
pgdg96 | 3.6 kB 00:00:00
(1/10): pgdg11/7/x86_64/group_gz | 245 B 00:00:01
(2/10): pgdg94/7/x86_64/group_gz | 247 B 00:00:01
(3/10): pgdg95/7/x86_64/group_gz | 249 B 00:00:00
(4/10): pgdg10/7/x86_64/group_gz | 245 B 00:00:01
.
.
.
Installed:
postgresql11-server.x86_64 0:11.3-1PGDG.rhel7
Dependency Installed:
postgresql11.x86_64 0:11.3-1PGDG.rhel7 postgresql11-libs.x86_64 0:11.3-1PGDG.rhel7
Complete!
Need to initialize the PostgreSQL instance
[root@linuxhelp ~]# /usr/pgsql-11/bin/postgresql-11-setup initdb
Initializing database ... OK
Start the postgresql service by using the following command
[root@linuxhelp ~]# systemctl start postgresql-11.service
Enable the postgresql service by using the following command
[root@linuxhelp ~]# systemctl enable postgresql-11.service
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-11.service to /usr/lib/systemd/system/postgresql-11.service.
Enter into the postgresql by using the following command
[root@linuxhelp ~]# sudo -u postgres psql
could not change directory to "/root": Permission denied
psql (11.3)
Type "help" for help.
Create a password for user
postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# \q
With this the method of installation of PostgreSQL 11 on Centos 7.6
Comments ( 0 )
No comments available