Melanjutkan instalasi server Centos kemarin, dimana ada cara instalasi baru di Linux Centos 8, yaitu dengan menggunakan "dnf". Kali ini saya akan sedikit share cara install PgAdmin dan Postgresql di Linux Centos 8.
Cara nya adalah :
1. Disable modul postgresql :
# dnf -qy module disable postgresql
Failed to set locale, defaulting to C.UTF-8
2. Download dan install PgAdmin dengan dnf :
# dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:02:16 ago on Mon Jan 18 23:04:16 2021.
pgdg-redhat-repo-latest.noarch.rpm 2.9 kB/s | 11 kB 00:03
Dependencies resolved.
======================================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================================
Installing:
pgdg-redhat-repo noarch 42.0-14 @commandline 11 k
Transaction Summary
======================================================================================================================================================
Install 1 Package
Total size: 11 k
Installed size: 11 k
Is this ok [y/N]: y
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-14.noarch 1/1
Verifying : pgdg-redhat-repo-42.0-14.noarch 1/1
Installed products updated.
Installed:
pgdg-redhat-repo-42.0-14.noarch
Complete!
3. Install postgresql dengan dnf dari repository :
# dnf install postgresql12 postgresql12-server
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:00:31 ago on Tue Jan 19 00:07:12 2021.
Dependencies resolved.
======================================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================================
Installing:
postgresql12 x86_64 12.5-1PGDG.rhel8 pgdg12 1.7 M
postgresql12-server x86_64 12.5-1PGDG.rhel8 pgdg12 5.2 M
Installing dependencies:
postgresql12-libs x86_64 12.5-1PGDG.rhel8 pgdg12 396 k
Transaction Summary
======================================================================================================================================================
Install 3 Packages
Total download size: 7.3 M
Installed size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): postgresql12-libs-12.5-1PGDG.rhel8.x86_64.rpm 201 kB/s | 396 kB 00:01
(2/3): postgresql12-12.5-1PGDG.rhel8.x86_64.rpm 492 kB/s | 1.7 MB 00:03
(3/3): postgresql12-server-12.5-1PGDG.rhel8.x86_64.rpm 780 kB/s | 5.2 MB 00:06
------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.1 MB/s | 7.3 MB 00:06
warning: /var/cache/dnf/pgdg12-64e2194e85277659/packages/postgresql12-12.5-1PGDG.rhel8.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
PostgreSQL 12 for RHEL/CentOS 8 - x86_64 1.6 MB/s | 1.7 kB 00:00
Importing GPG key 0x442DF0F8:
Userid : "PostgreSQL RPM Building Project <pgsqlrpms-hackers@pgfoundry.org>"
Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : postgresql12-libs-12.5-1PGDG.rhel8.x86_64 1/3
Running scriptlet: postgresql12-libs-12.5-1PGDG.rhel8.x86_64 1/3
Installing : postgresql12-12.5-1PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql12-12.5-1PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql12-server-12.5-1PGDG.rhel8.x86_64 3/3
Installing : postgresql12-server-12.5-1PGDG.rhel8.x86_64 3/3
Running scriptlet: postgresql12-server-12.5-1PGDG.rhel8.x86_64 3/3
Verifying : postgresql12-12.5-1PGDG.rhel8.x86_64 1/3
Verifying : postgresql12-libs-12.5-1PGDG.rhel8.x86_64 2/3
Verifying : postgresql12-server-12.5-1PGDG.rhel8.x86_64 3/3
Installed products updated.
Installed:
postgresql12-12.5-1PGDG.rhel8.x86_64 postgresql12-libs-12.5-1PGDG.rhel8.x86_64 postgresql12-server-12.5-1PGDG.rhel8.x86_64
Complete!
Semoga bermanfaat untuk pembaca semua.
Dony Ramansyah
site : http://donyramansyah.net
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 40017