PostgreSQL installation on REDHAT Installation :-
Filesystem Structure of Redhat Linux 8 :-
The PostgreSQL Yum
Repository will integrate with your normal systems and patch
management, and provide automatic updates for all supported versions of
PostgreSQL throughout the support lifetime of
PostgreSQL.
The PostgreSQL Yum Repository
currently supports:
- Red
Hat Enterprise Linux
- Rocky
Linux
- CentOS
- Scientific
Linux
- Oracle
Linux
- Fedora*
*Note: due
to the shorter support cycle on Fedora, all supported versions of PostgreSQL
are not available on this platform. We do not recommend using Fedora for server
deployments.
To use the PostgreSQL Yum
Repository, follow these steps:
Last login: Tue Jul 27 08:14:33 2021
[root@localhost ~]# sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Updating Subscription Management repositories.
Last metadata expiration check: 0:06:03 ago on Tue 27 Jul 2021 08:15:28 AM PDT.
pgdg-redhat-repo-latest.noarch.rpm 13 kB/s | 12 kB 00:00
Dependencies resolved.
=============================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================
Installing:
pgdg-redhat-repo noarch 42.0-19 @commandline 12 k
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total size: 12 k
Installed size: 12 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : pgdg-redhat-repo-42.0-19.noarch 1/1
Verifying : pgdg-redhat-repo-42.0-19.noarch 1/1
Installed products updated.
Installed:
pgdg-redhat-repo-42.0-19.noarch
Complete!
[root@localhost ~]# sudo dnf -qy module disable postgresql
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
[root@localhost ~]# sudo dnf install -y postgresql13-server
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:28 ago on Tue 27 Jul 2021 08:30:56 AM PDT.
Dependencies resolved.
=============================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================
Installing:
postgresql13-server x86_64 13.3-2PGDG.rhel8 pgdg13 5.5 M
Installing dependencies:
postgresql13 x86_64 13.3-2PGDG.rhel8 pgdg13 1.5 M
postgresql13-libs x86_64 13.3-2PGDG.rhel8 pgdg13 413 k
Transaction Summary
=============================================================================================================================================================================================
Install 3 Packages
Total download size: 7.4 M
Installed size: 31 M
Downloading Packages:
(1/3): postgresql13-libs-13.3-2PGDG.rhel8.x86_64.rpm 132 kB/s | 413 kB 00:03
(2/3): postgresql13-13.3-2PGDG.rhel8.x86_64.rpm 160 kB/s | 1.5 MB 00:09
(3/3): postgresql13-server-13.3-2PGDG.rhel8.x86_64.rpm 484 kB/s | 5.5 MB 00:11
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 646 kB/s | 7.4 MB 00:11
warning: /var/cache/dnf/pgdg13-e81daebfc8b779ec/packages/postgresql13-13.3-2PGDG.rhel8.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
PostgreSQL 13 for RHEL/CentOS 8 - x86_64 1.6 MB/s | 1.7 kB 00:00
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsql-pkg-yum@postgresql.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : postgresql13-libs-13.3-2PGDG.rhel8.x86_64 1/3
Running scriptlet: postgresql13-libs-13.3-2PGDG.rhel8.x86_64 1/3
Installing : postgresql13-13.3-2PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql13-13.3-2PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql13-server-13.3-2PGDG.rhel8.x86_64 3/3
Installing : postgresql13-server-13.3-2PGDG.rhel8.x86_64 3/3
Running scriptlet: postgresql13-server-13.3-2PGDG.rhel8.x86_64 3/3
Verifying : postgresql13-13.3-2PGDG.rhel8.x86_64 1/3
Verifying : postgresql13-libs-13.3-2PGDG.rhel8.x86_64 2/3
Verifying : postgresql13-server-13.3-2PGDG.rhel8.x86_64 3/3
Installed products updated.
Installed:
postgresql13-13.3-2PGDG.rhel8.x86_64 postgresql13-libs-13.3-2PGDG.rhel8.x86_64 postgresql13-server-13.3-2PGDG.rhel8.x86_64
Complete!
[root@localhost ~]# sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
Initializing database ... OK
[root@localhost ~]# sudo systemctl enable postgresql-13
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql-13.service → /usr/lib/systemd/system/postgresql-13.service.
[root@localhost ~]# sudo systemctl start postgresql-13
[root@localhost ~]# su - postgres
[postgres@localhost ~]$ ps -ef|grep post
postgres 35268 1 0 08:37 ? 00:00:00 /usr/pgsql-13/bin/postmaster -D /var/lib/pgsql/13/data/
postgres 35270 35268 0 08:37 ? 00:00:00 postgres: logger
postgres 35272 35268 0 08:37 ? 00:00:00 postgres: checkpointer
postgres 35273 35268 0 08:37 ? 00:00:00 postgres: background writer
postgres 35274 35268 0 08:37 ? 00:00:00 postgres: walwriter
postgres 35275 35268 0 08:37 ? 00:00:00 postgres: autovacuum launcher
postgres 35276 35268 0 08:37 ? 00:00:00 postgres: stats collector
postgres 35277 35268 0 08:37 ? 00:00:00 postgres: logical replication launcher
root 35384 34090 0 08:39 pts/0 00:00:00 su - postgres
postgres 35385 35384 1 08:39 pts/0 00:00:00 -bash
postgres 35437 35385 0 08:39 pts/0 00:00:00 ps -ef
postgres 35438 35385 0 08:39 pts/0 00:00:00 grep --color=auto post
Comments
Post a Comment