프린트 하기

OS환경 : Oracle Linux 7.6 (64bit)

 

DB 환경 : PostgreSQL 16

 

방법 : Oracle Linux 7.6에 PostgreSQL 16 설치 가이드(안됨)

Oracle Linux 7에 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
34
35
36
# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Loaded plugins: langpacks, ulninfo
pgdg-redhat-repo-latest.noarch.rpm                                                                                                                                                     |  10 kB  00:00:00
Examining /var/tmp/yum-root-_WV7Yg/pgdg-redhat-repo-latest.noarch.rpm: pgdg-redhat-repo-42.0-38PGDG.noarch
Marking /var/tmp/yum-root-_WV7Yg/pgdg-redhat-repo-latest.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pgdg-redhat-repo.noarch 0:42.0-38PGDG will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
==============================================================================================================================================================================================================
 Package                                          Arch                                   Version                                        Repository                                                       Size
==============================================================================================================================================================================================================
Installing:
 pgdg-redhat-repo                                 noarch                                 42.0-38PGDG                                    /pgdg-redhat-repo-latest.noarch                                  12 k
 
Transaction Summary
==============================================================================================================================================================================================================
Install  1 Package
 
Total size: 12 k
Installed size: 12 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : pgdg-redhat-repo-42.0-38PGDG.noarch                                                                                                                                                        1/1
  Verifying  : pgdg-redhat-repo-42.0-38PGDG.noarch                                                                                                                                                        1/1
 
Installed:
  pgdg-redhat-repo.noarch 0:42.0-38PGDG
 
Complete!

 

 

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
# yum install -y postgresql16-server
Loaded plugins: langpacks, ulninfo
pgdg-common/7Server/x86_64/signature                                                                                                                                                   |  665 B  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
Importing GPG key 0x73E3B907:
 Userid     : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
 Fingerprint: f245 f0bf 96ac 1827 44ca ff2e 64fa ce11 73e3 b907
 Package    : pgdg-redhat-repo-42.0-38PGDG.noarch (installed)
 From       : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
pgdg-common/7Server/x86_64/signature                                                                                                                                                   | 2.9 kB  00:00:00 !!!
pgdg12/7Server/x86_64/signature                                                                                                                                                        |  665 B  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
Importing GPG key 0x73E3B907:
 Userid     : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
 Fingerprint: f245 f0bf 96ac 1827 44ca ff2e 64fa ce11 73e3 b907
 Package    : pgdg-redhat-repo-42.0-38PGDG.noarch (installed)
 From       : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
pgdg12/7Server/x86_64/signature                                                                                                                                                        | 3.6 kB  00:00:00 !!!
pgdg13/7Server/x86_64/signature                                                                                                                                                        |  665 B  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
Importing GPG key 0x73E3B907:
 Userid     : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
 Fingerprint: f245 f0bf 96ac 1827 44ca ff2e 64fa ce11 73e3 b907
 Package    : pgdg-redhat-repo-42.0-38PGDG.noarch (installed)
 From       : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
pgdg13/7Server/x86_64/signature                                                                                                                                                        | 3.6 kB  00:00:00 !!!
pgdg14/7Server/x86_64/signature                                                                                                                                                        |  665 B  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
Importing GPG key 0x73E3B907:
 Userid     : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
 Fingerprint: f245 f0bf 96ac 1827 44ca ff2e 64fa ce11 73e3 b907
 Package    : pgdg-redhat-repo-42.0-38PGDG.noarch (installed)
 From       : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
pgdg14/7Server/x86_64/signature                                                                                                                                                        | 3.6 kB  00:00:00 !!!
pgdg15/7Server/x86_64/signature                                                                                                                                                        |  665 B  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
Importing GPG key 0x73E3B907:
 Userid     : "PostgreSQL RPM Repository <pgsql-pkg-yum@lists.postgresql.org>"
 Fingerprint: f245 f0bf 96ac 1827 44ca ff2e 64fa ce11 73e3 b907
 Package    : pgdg-redhat-repo-42.0-38PGDG.noarch (installed)
 From       : /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL7
pgdg15/7Server/x86_64/signature                                                                                                                                                        | 3.6 kB  00:00:00 !!!
(1/9): pgdg12/7Server/x86_64/group_gz                                                                                                                                                  |  246 B  00:00:01
(2/9): pgdg13/7Server/x86_64/group_gz                                                                                                                                                  |  246 B  00:00:02
(3/9): pgdg14/7Server/x86_64/group_gz                                                                                                                                                  |  245 B  00:00:00
(4/9): pgdg15/7Server/x86_64/group_gz                                                                                                                                                  |  247 B  00:00:00
(5/9): pgdg-common/7Server/x86_64/primary_db                                                                                                                                           | 204 kB  00:00:02
(6/9): pgdg12/7Server/x86_64/primary_db                                                                                                                                                | 419 kB  00:00:02
(7/9): pgdg14/7Server/x86_64/primary_db                                                                                                                                                | 260 kB  00:00:01
(8/9): pgdg13/7Server/x86_64/primary_db                                                                                                                                                | 342 kB  00:00:03
(9/9): pgdg15/7Server/x86_64/primary_db                                                                                                                                                | 166 kB  00:00:04
No package postgresql16-server available.
Error: Nothing to do

Nothing to do 라고 나옴

 

 

linux 8용 repo 도 설치 후 다시 시도해봤지만 에러 발생함

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
# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# yum install -y postgresql16-server
Loaded plugins: langpacks, ulninfo
https://download.postgresql.org/pub/repos/yum/16/redhat/rhel-7Server-x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
 
 
 One of the configured repositories failed (PostgreSQL 16 for RHEL / Rocky / AlmaLinux 7Server - x86_64),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:
 
     1. Contact the upstream for the repository and get them to fix the problem.
 
     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).
 
     3. Run the command with the repository temporarily disabled
            yum --disablerepo=pgdg16 ...
 
     4. Disable the repository permanently, so yum won'use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:
 
            yum-config-manager --disable pgdg16
        or
            subscription-manager repos --disable=pgdg16
 
     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:
 
            yum-config-manager --save --setopt=pgdg16.skip_if_unavailable=true
 
failure: repodata/repomd.xml from pgdg16: [Errno 256] No more mirrors to try.
https://download.postgresql.org/pub/repos/yum/16/redhat/rhel-7Server-x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

 

 

에러를 보면 아래 경로를 찾을수 없다고 나옴

https://download.postgresql.org/pub/repos/yum/16/redhat/rhel-7Server-x86_64/repodata/repomd.xml

실제로 들어가보면 404 Not Found 라고 나옴

 

 

이 경로를 rhel-8로 변경한뒤 접속 시도

https://download.postgresql.org/pub/repos/yum/16/redhat/rhel-8Server-x86_64/repodata/repomd.xml

정상적으로 repomd.xml 파일이 열림

 

 

그리고 제일 처음 말한 설치메뉴얼 링크의 하단에 보면 Direct RPM download 페이지가 존재함

https://www.postgresql.org/download/linux/redhat/

 

 

여기 들어가서 PostgreSQL 16 부분을 봐도 Linux 7 은 파일은 존재하지 않음 

 

 

Browse 버튼을 눌려서 전체 설치파일 목록을 확인할수있는데

여기서도 rhel-7 버전대 링크를 클릭하면 404 Not Found 페이지가 나옴

 

 

결론 :

2024년 03월 22일 기준 공식 설치 메뉴얼 페이지에는 linux 7 에도 설치가능한것처럼 되어있지만
linux 7 repo에는 postgreSQL 16의 설치파일은 존재하지않아 설치가 불가능한듯함
Linux 8 에 설치해야 할듯함

 

 

참조 : https://www.postgresql.org/download/linux/redhat/