OS환경 : Oracle Linux 8.4 (64bit)
DB 환경 : PostgreSQL 16
방법 : Oracle Linux 8.4에 PostgreSQL 16 설치 가이드
Oracle Linux 8에 PostgreSQL 16을 설치하려고 공식 메뉴얼을 보고 설치시도 해보았음
https://www.postgresql.org/download/linux/redhat/
위 링크에 있는 명령어로 설치해봄
PostgreSQL용 repository RPM 설치
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Oracle Linux 8 BaseOS Latest (x86_64) 18 MB/s | 71 MB 00:03
Oracle Linux 8 Application Stream (x86_64) 23 MB/s | 55 MB 00:02
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64) 27 MB/s | 88 MB 00:03
Last metadata expiration check: 0:00:27 ago on Fri 22 Mar 2024 11:30:04 PM KST.
pgdg-redhat-repo-latest.noarch.rpm 13 kB/s | 14 kB 00:01
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Installing:
pgdg-redhat-repo noarch 42.0-40PGDG @commandline 14 k
Transaction Summary
==============================================================================================================================================================================================================
Install 1 Package
Total size: 14 k
Installed size: 15 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-40PGDG.noarch 1/1
Verifying : pgdg-redhat-repo-42.0-40PGDG.noarch 1/1
Installed:
pgdg-redhat-repo-42.0-40PGDG.noarch
Complete!
|
repo 설치완료
PostgreSQL built-in 모듈 비활성화(정확히 뭔지는 모르지만 공식메뉴얼에 있으니 진행)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# dnf -qy module disable postgresql
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
|
PostgreSQL 설치
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# yum install -y postgresql16-server
Last metadata expiration check: 0:12:54 ago on Fri 22 Mar 2024 11:42:59 PM KST.
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Installing:
postgresql16-server x86_64 16.2-1PGDG.rhel8 pgdg16 6.7 M
Installing dependencies:
postgresql16 x86_64 16.2-1PGDG.rhel8 pgdg16 1.9 M
postgresql16-libs x86_64 16.2-1PGDG.rhel8 pgdg16 328 k
Transaction Summary
==============================================================================================================================================================================================================
Install 3 Packages
Total download size: 8.9 M
Installed size: 39 M
Downloading Packages:
(1/3): postgresql16-libs-16.2-1PGDG.rhel8.x86_64.rpm 70 kB/s | 328 kB 00:04
(2/3): postgresql16-server-16.2-1PGDG.rhel8.x86_64.rpm 250 kB/s | 6.7 MB 00:27
(3/3): postgresql16-16.2-1PGDG.rhel8.x86_64.rpm 49 kB/s | 1.9 MB 00:38
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 235 kB/s | 8.9 MB 00:39
warning: /var/cache/dnf/pgdg16-e931b2417cecc8ce/packages/postgresql16-16.2-1PGDG.rhel8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 08b40d20: NOKEY
PostgreSQL 16 for RHEL / Rocky / AlmaLinux 8 - x86_64 2.4 MB/s | 2.4 kB 00:00
Importing GPG key 0x08B40D20:
Userid : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
Fingerprint: D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20
From : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : postgresql16-libs-16.2-1PGDG.rhel8.x86_64 1/3
Running scriptlet: postgresql16-libs-16.2-1PGDG.rhel8.x86_64 1/3
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
Installing : postgresql16-16.2-1PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql16-16.2-1PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql16-server-16.2-1PGDG.rhel8.x86_64 3/3
Installing : postgresql16-server-16.2-1PGDG.rhel8.x86_64 3/3
Running scriptlet: postgresql16-server-16.2-1PGDG.rhel8.x86_64 3/3
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored
[/usr/lib/tmpfiles.d/pesign.conf:1] Line references path below legacy directory /var/run/, updating /var/run/pesign → /run/pesign; please update the tmpfiles.d/ drop-in file accordingly.
Verifying : postgresql16-16.2-1PGDG.rhel8.x86_64 1/3
Verifying : postgresql16-libs-16.2-1PGDG.rhel8.x86_64 2/3
Verifying : postgresql16-server-16.2-1PGDG.rhel8.x86_64 3/3
Installed:
postgresql16-16.2-1PGDG.rhel8.x86_64 postgresql16-libs-16.2-1PGDG.rhel8.x86_64 postgresql16-server-16.2-1PGDG.rhel8.x86_64
Complete!
|
DB 초기화 및 자동 기동 설정(선택사항)
1
2
3
4
5
6
7
|
# /usr/pgsql-16/bin/postgresql-16-setup initdb
Initializing database ... OK
# systemctl enable postgresql-16
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql-16.service → /usr/lib/systemd/system/postgresql-16.service.
# systemctl start postgresql-16
|
postgres 유저로 접속 후 버전 확인
1
2
3
4
5
6
7
8
9
10
|
# su - postgres
$ psql --version
psql (PostgreSQL) 16.2
$ psql
postgres=# select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20), 64-bit
(1 row)
|
정상적으로 설치됨
참조 :
https://www.postgresql.org/download/linux/redhat/
https://wikidocs.net/184222
'PostgreSQL > Install' 카테고리의 다른 글
Oracle Linux 7.6에 PostgreSQL 16 설치 가이드(실패) (0) | 2024.03.22 |
---|---|
linux7.6에 PostgreSQL 10 + PG-Strom 2.2 구성하기(성공) (0) | 2019.11.08 |
PostgreSQL 10 환경에서 collate ko_kr.utf-8 로 database 생성하기 (0) | 2019.11.05 |
PostgreSQL 10, oracle fdw extension 생성방법 (0) | 2019.10.28 |
linux7.6에 PostgreSQL 10 + PostGIS 2.5.3 구성하기(성공) (4) | 2019.10.28 |